What are gradients in Canvas used for? What are their different types?
0
Gradients in canvas are used to fill rectangles, circles, lines etc.
The gradients in Canvas are of two types:
- createLinearGradient(x,y,x1,y1) – It creates a linear gradient
- createRadialGradient(x,y,r,x1,y1,r1) – It creates a radial/circular gradient
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.