Answer the question
In order to leave comments, you need to log in
Variable Width Lines in HTML5 Canvas
Is there a JS library that can draw on canvas lines with variable width?
Well, that is, for example: at the beginning, the thickness is 3px, at the end 5px, and so that it changes smoothly along the entire line.
For straight lines, this is, in principle, not very difficult to implement. But for Bezier curves, the solution is non-trivial.
Answer the question
In order to leave comments, you need to log in
well, the obvious way is to cut the curve into many segments, each slightly thicker than the previous one.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question