Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

draw rectangle html canvas

function drawRectangle(point: Vector, width: number, height: number) {
  this.context.beginPath();
  this.context.rect(point.x, point.y, width, height);
  this.context.fill();
  this.context.stroke();
}
 
PREVIOUS NEXT
Tagged: #draw #rectangle #html #canvas
ADD COMMENT
Topic
Name
3+7 =