Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

draw rectangle html canvas

let canvas = document.getElementById("canvas");
let context = canvas.getContext("2d");
context.beginPath();
context.rect(point.x, point.y, width, height);
context.fill();
context.stroke();
 
PREVIOUS NEXT
Tagged: #draw #rectangle #html #canvas
ADD COMMENT
Topic
Name
7+1 =