Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to fill path item with color
    primarykey
    data
    text
    <p>I'm trying to draw closed path and fill it with some collor. Here the code</p> <pre><code>startRulerUnits = app.preferences.rulerUnits startTypeUnits = app.preferences.typeUnits startDisplayDialogs = app.displayDialogs //change settings app.preferences.rulerUnits = Units.PIXELS app.preferences.typeUnits = TypeUnits.PIXELS app.displayDialogs = DialogModes.NO var AD = activeDocument; var bBox = new Array(); bBox[0] = 10; bBox[1] = 10; bBox[2] = 50; bBox[3] = 10; bBox[4] = 50; bBox[5] = 50; bBox[6] = 10; bBox[7] = 50; var line = new Array(); line[0] = new PathPointInfo; line[0].kind = PointKind.CORNERPOINT; line[0].anchor = [bBox[0],bBox[1]]; line[0].leftDirection = line[0].anchor; line[0].rightDirection = line[0].anchor; line[1] = new PathPointInfo; line[1].kind = PointKind.CORNERPOINT; line[1].anchor = [bBox[2],bBox[3]]; line[1].leftDirection = line[1].anchor; line[1].rightDirection = line[1].anchor; line[2] = new PathPointInfo; line[2].kind = PointKind.CORNERPOINT; line[2].anchor = [bBox[4],bBox[5]]; line[2].leftDirection = line[2].anchor; line[2].rightDirection = line[2].anchor; line[3] = new PathPointInfo; line[3].kind = PointKind.CORNERPOINT; line[3].anchor = [bBox[6],bBox[7]]; line[3].leftDirection = line[3].anchor; line[3].rightDirection = line[3].anchor; var lineSubPath= new Array(); lineSubPath[0] = new SubPathInfo(); lineSubPath[0].operation = ShapeOperation.SHAPEXOR; lineSubPath[0].closed = true; lineSubPath[0].entireSubPath = line; var path = AD.pathItems.add("A", lineSubPath); //var paperShape = AD.artLayers.add(); var colorRef = new SolidColor; colorRef.rgb.red = 255 colorRef.rgb.green = 100; colorRef.rgb.blue = 10; path.fillPath(colorRef, ColorBlendMode.COLOR,100,true,0,true,true); //shapeLayer.applyStyle("ransom_note");*/ app.preferences.rulerunits = startRulerUnits app.preferences.typeunits = startTypeUnits app.displayDialogs = startDisplayDialogs </code></pre> <p>path is drawn, but error apears while filling</p> <p><strong>fillPath is not a function.</strong></p> <p>Can anybody help?</p> <p>P.S. Sorry for my English</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload