The ID of the document of this pathItem.
For use with batchPlay operations. This pathItem ID, along with its document ID can be used to represent this pathItem for the lifetime of this document.
Name of this path
The document in which the path resides.
The contained SubPathItems in this path.
The class name of the referenced object: "PathItem".
Deselects this pathItem object.
Duplicates the pathItem object with the new name, returning the duplicate.
Optionalname: stringFills the area enclosed by this path.
opacity is a percentage, in the [0.0 ... 100.0] range.
feather is in pixels, in the [0.0 ... 250.0] range.
If wholePath is true, all subpaths are used when doing the fill.
OptionalfillColor: SolidColorOptionalmode: ColorBlendModeOptionalopacity: numberOptionalpreserveTransparency: booleanOptionalfeather: numberOptionalwholePath: booleanOptionalantiAlias: booleanMakes a selection object whose border is this path.
feather is in pixels, in the range [0.0...250.0]
operation, by default, is SelectionType.REPLACE
Optionalfeather: numberOptionalantiAlias: booleanOptionaloperation: SelectionTypeDeletes this object.
Makes this the active or selected PathItem object.
Strokes the path with the specified tool
tool is optional, and by default will use ToolType.PENCIL
simulatePressure is false by default.
If the tool is ToolType.CLONESTAMP or ToolType.HEALINGBRUSH, sourceOrigin must be provided as a
an object with x and y properties (in pixels) to indicate the location of the stroke source. sourceLayer
is optional, and by default will use the active layer in the document.
// Stroke a path with the brush tool
const path = app.activeDocument.pathItems[0];
await path.strokePath(constants.ToolType.BRUSH, false);
A path or drawing object, such as the outline of a shape or a straight or curved line, which contains sub paths defining its geometry.
Access through the collection in the Document.pathItems property. For example, this selects a named path item:
See
https://developer.adobe.com/photoshop/uxp/2022/ps_reference/classes/pathitem/
Example
Create these objects by passing a set of SubPathInfo objects to the PathItems.add() method. This method creates a SubPathItem object for each SubPathInfo object, and creates and returns a new PathItem object for the path represented by all of the subpaths.
Min Version
23.3