HTML5 Canvas 基礎 ( HTML5 Canvas Basic )

若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。
If you like this post, please click the ads on the blog. Thank you very much.

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.

沒有留言: