Line - Draws a line segment with the given inputs
line(100,100,300,300)
line(x1, y1, x2, y2)
x1
x co-ordinate of the first endpoint of the line
y1
y co-ordinate of the first endpoint of the line
x2
x co-ordinate of the second endpoint of the line
y2
y co-ordinate of the second endpoint of the line
line() draws a line on the canvas, using the inputs to determine the position of the 2 endpoints (the points on either end of the line segment.)
Find these documents helpful? Let the people who made them help your child learn to code at Strivematharrow-up-right!
We'd love to hear your Feedback/Comments herearrow-up-right.
Last updated 2 years ago