[BNM] paper.js question

Toby Skinner toby at globaloptima.co.uk
Wed Mar 18 15:36:17 GMT 2015


compoundpath didn't work either, only solution appears to be to create 
lots of separate edge paths between the points and style them 
individually, doesn't seem to be any slower though.

On 18/03/2015 14:53, Toby Skinner wrote:
> Hi list,
>
> Anyone here got any paper.js experience?
>
> I'm trying to do something really simple, I have an array of points, I 
> want to create a path where the first half of the path is red and the 
> second half is blue.
>
> I'm using Path.moveTo and Path.lineTo but the full path always takes 
> the colour of the last strokeColour that I set (I was expecting the 
> call to lineTo to use the colour of path.strokeColour but it seems 
> that lineTo may just be simply adding a segment to the path and 
> strokeColour isn't used till render).
>
> I'm quite keen to keep using paper.js and I'm guessing a CompoundPath 
> will work but it seems overly complex to start computing lines between 
> points etc, can anyone think of a simple way to do this?
>
> Cheers
>
> Toby



More information about the BNMlist mailing list