Does anybody have any idea, how to apply multiple strokes to a path with JavaScript? Assigning strokes width, caps, position in stack (my particular concern)? All i can do at the moment is to apply a single stroke. Thanks in advance!
you can't apply multliple strokes, the one thing you can do is, create a graphic style (by hand) with all your attributes (stroke width, caps, multiple strokes, etc) then apply that graphic style via JS.
caps, stroke width, position
yourpath.strokeCap = StrokeCap.ROUNDENDCAP;
yourpath.strokeWidth = 5;
yourpath.zOrder (ZOrderMethod.SENDTOBACK);
I'm writing a script that would generate random stroke appearences on the fly, so using premade graphic styles does not work for me. Your samples work for a single stroke and so far i can't figure out how to apply several of them to the same path. Every next setting overwrites the previos. Can't get, say, two storkes of different width and color applied to the same path.
yourpath.zOrder (ZOrderMethod.SENDTOBACK); works in the layers stack for moving layers up and down, and i would like to move strokes in appearance tab the same way. Can't figure out how to make it either. Thank you anyway, Carlos!
North America
Europe, Middle East and Africa
Asia Pacific