Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 1 of 1
Thread: Varying Stroke Width - paper.js
05-04-2013, 02:58 PM #1
- Join Date
- May 2013
- Thanked 0 Times in 0 Posts
Varying Stroke Width - paper.js
I'm using the vector graphics library, paper.js, which makes it easy to draw vector
Paths on the display. For a given path, you can set the width of the
stroke. So a very simple path would be a line across the screen and by
setting the strokeWidth property, I can make that line very thin or very fat.
But using the strokeWidth property affects the width of the entire path.
So it's not obvious how one would go about trying to draw a line where the
width of the line varied. So int he horizontal line example, it might start off
with a width of 1 pixel wide but then widen until it reached the end of the line
and was, say, 10 pixels wide.
I don't mean that as an animation, mind you, I mean varying stroke width on
a static image. Much like what a caligraphy line looks like on paper.
I've spent several hours reading the reference to the API, experimenting and
googling and so far not found any way to do this...
Does anyone know of a way to pull this off?