[BNM] paper.js question

Jack Moxley jack at moxley.co.uk
Wed Mar 18 16:41:26 GMT 2015


Have you tried svg instead?

Sent from my iPhone

> On 18 Mar 2015, at 16:32, Toby Skinner <toby at globaloptima.co.uk> wrote:
> 
> as far as I can tell, that should be what a CompoundPath is for but for some reason all the paths inside a CompoundPath take on the style assigned to the CompoundPath (or the last added path segment).
> 
> adding all the paths separately works but it means I can't smooth the line which is a pain, I've tried a path of paths and a path of lines and that wont smooth either.
> 
> it's not a huge issue, just seems like a bit of a strange thing not to be able to do.
> 
>> On 18/03/2015 16:05, Ian B wrote:
>> Not used paper.js, so probably talking rubbish, but couldn't you create two
>> paths and put them in a group (maybe create the path, and split it?)
>> 
>> On Wed, Mar 18, 2015 at 3:36 PM, Toby Skinner <toby at globaloptima.co.uk>
>> wrote:
>> 
>>> 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
>>> --
>>> 
>>> BNM Subscribe/Unsubscribe:
>>> http://www.brightonnewmedia.org/options/bnmlist
>>> 
>>> BNM members often work together in the real world at:
>>> http://www.theskiff.org
>>> 
>>> BNM powered by Wessex Networks:
>>> http://www.wessexnetworks.com
> 
> -- 
> 
> BNM Subscribe/Unsubscribe:
> http://www.brightonnewmedia.org/options/bnmlist
> 
> BNM members often work together in the real world at: http://www.theskiff.org
> 
> BNM powered by Wessex Networks:
> http://www.wessexnetworks.com



More information about the BNMlist mailing list