PathShape

subclass of Shape

A path shape object.
 
Path

Type

path

returns Path; settable

Gets / Sets the path of the shape.
 

Example: sets a new path for the frontmost selected path shape

var doc = [app activeDocument]
var shape = [[doc selectedShapes] lastObject]

if([shape type] == "pathShape")
{
    var path = [doc addPath]
    [path addMoveTo:CGPointMake(25, 150)]
    [path addLineTo:CGPointMake(75, 50)]
    [path addLineTo:CGPointMake(125, 150)]
    [path addClose]

    shape.path = path
}

type

returns String

Gets the type of this shape - "pathShape"
 

Next: TextShape