Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

draw line html canvas

function drawLine(point1: Vector, point2: Vector) {
  this.context.beginPath();
  this.context.moveTo(point1.x, point1.y);
  this.context.lineTo(point2.x, point2.y)
  this.context.stroke();
}
 
PREVIOUS NEXT
Tagged: #draw #line #html #canvas
ADD COMMENT
Topic
Name
6+6 =