LayoutPolygons

A collection of polygons.

Instance Properties

Name Description Access
length number The number of objects in the collection. read-only

Methods

add(
[layer] ​[, numberOfSides] ​[, insetPercentage] ​[, at], reference ​[, withProperties])
 → Polygon
anyItem(
)
 → Polygon
count(
)
 → number
everyItem(
)
 → Polygon
firstItem(
)
 → Polygon
item(
index)
 → Polygon
itemByID(
id)
 → Polygon
itemByName(
name)
 → Polygon
itemByRange(
from, to)
 → Polygon
lastItem(
)
 → Polygon
middleItem(
)
 → Polygon
nextItem(
obj)
 → Polygon
previousItem(
obj)
 → Polygon
toSource(
)
 → string
add(
[layer] ​[, numberOfSides] ​[, insetPercentage] ​[, at=LocationOptions.UNKNOWN], reference ​[, withProperties])
 → Polygon
Creates a new Polygon.
layer Layer The layer on which to create the Polygon. (Optional)
numberOfSides number The number of sides to give the Polygon. (Range: 3 to 100) (Optional)
insetPercentage number The star inset percentage applied to the Polygon. (Optional)
at LocationOptions The location at which to insert the Polygon relative to the reference object or within the container object. (Optional)
reference The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem. (Optional)
withProperties Object Initial values for properties of the new Polygon (Optional)
anyItem(
)
 → Polygon
Returns any Polygon in the collection.
count(
)
 → number
Displays the number of elements in the Polygon.
everyItem(
)
 → Polygon
Returns every Polygon in the collection.
firstItem(
)
 → Polygon
Returns the first Polygon in the collection.
item(
index)
 → Polygon
Returns the Polygon with the specified index or name.
index The index or name. Can accept: Long Integer or String.
itemByID(
id)
 → Polygon
Returns the Polygon with the specified ID.
id number The ID.
itemByName(
name)
 → Polygon
Returns the Polygon with the specified name.
name string The name.
itemByRange(
from, to)
 → Polygon
Returns the Polygons within the specified range.
from The Polygon, index, or name at the beginning of the range. Can accept: Polygon, Long Integer or String.
to The Polygon, index, or name at the end of the range. Can accept: Polygon, Long Integer or String.
lastItem(
)
 → Polygon
Returns the last Polygon in the collection.
middleItem(
)
 → Polygon
Returns the middle Polygon in the collection.
nextItem(
obj)
 → Polygon
Returns the Polygon whose index follows the specified Polygon in the collection.
obj Polygon The Polygon whose index comes before the desired Polygon.
previousItem(
obj)
 → Polygon
Returns the Polygon with the index previous to the specified index.
obj Polygon The index of the Polygon that follows the desired Polygon.
toSource(
)
 → string
Generates a string which, if executed, will return the Polygon.