Adobe Photoshop CS3
JavaScript Scripting Reference
JavaScript Object Reference 139
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.
Note:
Because the
PathItem
class is also a property of the
Document
object, you use the property name,
pathItem
, rather than the class name,
PathItem
, in your code.
The following example uses correct syntax to select a
pathItem
object :
activeDocument.pathItem(“myPath”).select()
The following example, which uses an upper case
P
in the object name, is incorrect:
activeDocument.PathItem(“myPath”).select()
Properties
Methods
Property
Value Type
What it is
kind
PathKind
Read-write. The
pathItem
object’s type.
name
string
Read-write. The
pathItem
object’s name.
parent
object
(
Document
)
Read-only. The
pathItem
object's container.
SubPathItems
SubPathItems
Read-only. The sub path objects for this
pathItem
object.
typename
string
Read-only. The class name of the referenced
pathItem
object.
Method
Parameter Type
Returns
What it does
deselect
()
Deselects this
pathItem
object.
duplicate
(name)
string
Duplicates this
pathItem
object with the new name
specified in the argument.
fillPath
([fillColor]
[, mode]
[, opacity]
[, preserveTransparency]
[, feather]
[, wholePath]
[, antiAlias])
Object (
SolidColor
,
ArtLayer
,
HistoryState
)
ColorBlendMode
number (double)
boolean
number (double)
boolean
boolean
Fills the area enclosed by the
path (
opacity
: 0 - 100 as
percent;
feather
: 0.0 - 250.0 in
pixels).
The
wholePath
parameter
indicates that all subpaths are
used when doing the fill.
(Default:
true
).