PathItem

A path or drawing object, such as the outline of a shape or a straight or curved line, which contains sub paths that comprise its geometry.

Methods:

add, duplicate, remove, removeAll, duplicate, makeSelection, fillPath, strokePath, makeClippingPath, select, deselect

Objects:

PathKind, String, SubPathItems

Property Listing

Property

Type

Access

Description

kind

PathKind

PathKind.NORMALPATH

PathKind.CLIPPINGPATH

PathKind.WORKPATH

PathKind.VECTORMASK

PathKind.TEXTMASK

read/write

The type of path.

name

String

read/write

The name of the path item.

parent

 

readonly

The object's container.

subPathItems

SubPathItems SubPathItem

readonly

The sub path objects for this path item.

typename

String

readonly

The class name of the object.

Method Listing

PathItem add ()

Adds an element.

undefined deselect ()

Unselects the selection, no path items are selected.

PathItem duplicate (relativeObject:Object, insertionLocation:ElementPlacement)

Duplicate this object.

Parameter

Type

Description

relativeObject

Object

 

insertionLocation

ElementPlacement

ElementPlacement.PLACEAFTER

ElementPlacement.PLACEBEFORE

ElementPlacement.PLACEATEND

 

PathItem duplicate ([name:String])

Duplicates this path item.

Parameter

Type

Description

name

String

The name for the new path.

undefined fillPath ([fillColor:Varies], [mode:ColorBlendMode], [opacity:Number], [preserveTransparency:Boolean], [feather:Number], [antiAlias:Boolean], [wholePath:Boolean])

Fills the area enclosed by the path.

Parameter

Type

Description

fillColor

Varies

The color of the fill for this path.

mode

ColorBlendMode

ColorBlendMode.NORMAL

ColorBlendMode.DISSOLVE

ColorBlendMode.BEHIND

ColorBlendMode.CLEAR

ColorBlendMode.DARKEN

ColorBlendMode.MULTIPLY

ColorBlendMode.COLORBURN

ColorBlendMode.LINEARBURN

ColorBlendMode.LIGHTEN

ColorBlendMode.SCREEN

ColorBlendMode.COLORDODGE

ColorBlendMode.LINEARDODGE

ColorBlendMode.OVERLAY

ColorBlendMode.SOFTLIGHT

ColorBlendMode.HARDLIGHT

ColorBlendMode.VIVIDLIGHT

ColorBlendMode.LINEARLIGHT

ColorBlendMode.PINLIGHT

ColorBlendMode.DIFFERENCE

ColorBlendMode.EXCLUSION

ColorBlendMode.SUBTRACT

ColorBlendMode.DIVIDE

ColorBlendMode.HUE

ColorBlendMode.SATURATION

ColorBlendMode.COLOR

ColorBlendMode.LUMINOSITY

ColorBlendMode.HARDMIX

ColorBlendMode.LIGHTERCOLOR

ColorBlendMode.DARKERCOLOR

The blending mode of the fill for this path.

opacity

Number

The opacity of the fill for this path (as a percentage). Range: 0.0 to 100.0.

preserveTransparency

Boolean

If true, transparency is preserved.

feather

Number

The feather amount in pixels. Range: 0.0 to 250.0.

antiAlias

Boolean

If true, uses anti-aliasing for the selection.

wholePath

Boolean

If true, uses all subpaths when doing the fill.

undefined makeClippingPath ([flatness:Number])

Makes this path item the clipping path for this document.

Parameter

Type

Description

flatness

Number

Flatness in device pixels; tells the PostScript printer how to approximate curves. Range: 0.2 to 100).

undefined makeSelection ([feather:Number], [antiAlias:Boolean], [operation:SelectionType])

Makes a selection object, whose border is the path, from this path item object.

Parameter

Type

Description

feather

Number

The feather amount in pixels. Range: 0.0 to 250.0.

antiAlias

Boolean

If true, the selection uses anti-aliasing.

operation

SelectionType

SelectionType.REPLACE

SelectionType.EXTEND

SelectionType.DIMINISH

SelectionType.INTERSECT

The selection behavior relative to the existing selection (when a selection already exists).

undefined remove ()

Deletes this object.

undefined removeAll ()

Deletes all elements.

undefined select ()

Makes this path item the active or selected path item.

undefined strokePath ([tool:ToolType], [simulatePressure:Boolean])

Strokes the path.

Parameter

Type

Description

tool

ToolType

ToolType.PENCIL

ToolType.BRUSH

ToolType.ERASER

ToolType.BACKGROUNDERASER

ToolType.CLONESTAMP

ToolType.PATTERNSTAMP

ToolType.HEALINGBRUSH

ToolType.HISTORYBRUSH

ToolType.ARTHISTORYBRUSH

ToolType.SMUDGE

ToolType.BLUR

ToolType.SHARPEN

ToolType.DODGE

ToolType.BURN

ToolType.SPONGE

ToolType.COLORREPLACEMENTTOOL

The tool to use when stroking the path.

simulatePressure

Boolean

If true, simulates the pressure when using the tool.

Return

PathItem.add()

PathItems.add()

PathItem.duplicate()

PathItem.duplicate()

PathItems.[]()

PathItems.getByName()