HTML5 Canvas 基礎 ( HTML5 Canvas Basic )

Ping-Lun Liao
1 min readNov 20, 2018

--

Canvas是一個可以在上面畫東西的畫紙例如可以畫圓、畫矩形等,而Canvas的座標系統的原點在最左上角,Y軸向下遞增,X軸向右遞增(見下圖)。 The HTML Canvas is a element used to draw some graphics(circles, rectangles, lines, etc.) on it. And the Canvas coordinates system is on the figure:

那我們就來畫個小精靈吧! Let’s draw a Pac-Man.

See the Pen wWkYjz by pinglunliao (@pinglunliao) on CodePen.

Originally published at yunlinsong.blogspot.com on November 20, 2018.

--

--

No responses yet