Brian
Brian

Reputation: 22

KineticJS polygon multiple stroke colors

Is it possible to have multiple stroke colors for a KineticJS regular polygon?

Here is a fiddle of just a regular pentagon http://jsfiddle.net/BrianSpry/wNT4D/. Essentially I want to be able to have a

    stroke: 'insert different color'

for each of the 5 sides, however I do not know if that is easily possible with KineticJs.

Thanks!

Upvotes: 0

Views: 161

Answers (1)

markE
markE

Reputation: 105015

The regular polygon shape can only have 1 stroke color.

As a workaround, you can use a Kinetic.Group containing 5 Kinetic.Lines with different fill colors to assemble a 5 colored pentagon.

Upvotes: 1

Related Questions