Skip to content

Commit 0e9b21b

Browse files
feat: add Canvas API
1 parent f47ef82 commit 0e9b21b

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
INFO: Canvas API (2D)
3+
Provides a pixel-based 2D drawing API via <canvas>, great for animations, charts, games, and image manipulation
4+
*/
5+
6+
// Common Methods
7+
const canvas = document.getElementById("c");
8+
const ctx = canvas.getContext("2d");
9+
ctx.fillStyle = "green";
10+
ctx.fillRect(10, 10, 150, 100);

0 commit comments

Comments
 (0)