PathItems

A collection of path items.

Methods:

add, ellipse, getByName, polygon, rectangle, removeAll, roundedRectangle, star

Property Listing

Property

Type

Access

Description

length

Int

readonly

Number of elements in the collection.

parent

 

readonly

The object's container.

typename

String

readonly

The class name of the object.

Method Listing

PathItem add ()

Create a path.

PathItem ellipse ([top:Number=Number], [left:Number=Number], [width:Number=Number], [height:Number=Number], [reversed:Boolean=Boolean], [inscribed:Boolean=Boolean])

Create an elliptical path item.

Parameter

Type

Description

top

Number

The ellipse's bounds.

(default: 100)

left

Number

The ellipse's bounds.

(default: 100)

width

Number

The ellipse's bounds.

(default: 50)

height

Number

The height of the ellipse.

(default: 100)

reversed

Boolean

Is the ellipse path reversed?

(default: false)

inscribed

Boolean

Is the ellipse path inscribed?

(default: true)

PathItem getByName (name:String)

Get the first element in the collection with the provided name.

Parameter

Type

Description

name

String

 

PathItem polygon ([centerX:Number=Number], [centerY:Number=Number], [radius:Number=Number], [sides:Int32=Int32], [reversed:Boolean=Boolean])

Used to create a regular polygon path item. Not for path item access.

Parameter

Type

Description

centerX

Number

(default: 200)

centerY

Number

(default: 300)

radius

Number

The radius of the polygon points.

(default: 50)

sides

Int32

The number of sides on the polygon.

(default: 8)

reversed

Boolean

Is the polygon path reversed?

(default: false)

PathItem rectangle (top:Number, left:Number, width:Number, height:Number, [reversed:Boolean=Boolean])

Used to create a rectangular path item. Not for path item access.

Parameter

Type

Description

top

Number

The top coordinate of the rectangle's bounds.

left

Number

The left coordinate of the rectangle's bounds.

width

Number

The width of the rectangle.

height

Number

The height of the rectangle.

reversed

Boolean

Is the rectangle path reversed?

(default: false)

undefined removeAll ()

Deletes all elements.

PathItem roundedRectangle (top:Number, left:Number, width:Number, height:Number, [horizontalRadius:Number=Number], [verticalRadius:Number=Number], [reversed:Boolean=Boolean])

Used to create a rounded-corner rectangular path item. Not for path item access.

Parameter

Type

Description

top

Number

 

left

Number

 

width

Number

 

height

Number

 

horizontalRadius

Number

Horizontal corner radius.

(default: 15)

verticalRadius

Number

Vertical corner radius.

(default: 20)

reversed

Boolean

Is the rectangle path reversed?

(default: false)

PathItem star ([centerX:Number=Number], [centerY:Number=Number], [radius:Number=Number], [innerRadius:Number=Number], [points:Int32=Int32], [reversed:Boolean=Boolean])

Used to create a star-shaped path item. Not for path item access.

Parameter

Type

Description

centerX

Number

(default: 200)

centerY

Number

(default: 300)

radius

Number

The outside radius of the star points.

(default: 50)

innerRadius

Number

The inside radius of the star points.

(default: 20)

points

Int32

The number of points on the star.

(default: 5)

reversed

Boolean

Is the star path reversed?

(default: false)

Object of

CompoundPathItem.pathItems

Document.pathItems

GroupItem.pathItems

Layer.pathItems