Answered
fill enclosed path with customized color use java script
I found a method in pathitem class named fillPath. I tried it but nothing happened. Please help!
var myPathItem = doc.pathItems.add("myPath", lineSubPathArray);
var scolor = new SolidColor();
scolor.rgb.red = 173;
scolor.rgb.green = 41;
scolor.rgb.blue = 30;
myPathItem.fillPath(scolor, ColorBlendMode.NORMAL);
alert("111");
myPathItem.strokePath(ToolType.BRUSH);
I think my 'mypathitem' is right, cause without fillpath function, the strokepath function gives the right answer.