Which methods are used to draw a straight line on a Canvas?
0
Following methods are used to draw a straight line on a Canvas:
- moveTo(x,y) – It defines the starting co-ordinates of the line.
- lineTo(x,y) – It defines the ending co-ordinates of the line.
- The actual line is drawn with the help of a method like stroke()
Sign in to add a comment
0 Answers
0
📝 No answers yet!
Be the first to answer this interview question.
Your Answer
Sign in to post your answer and help the community.