Adobe InDesign CS4 (6.0) Object Model JS: Polygons

InDesign CS4

Class

Polygons

 A collection of polygons.

QuickLinks

[], add, anyItem, count, everyItem, firstItem, item, itemByID, itemByName, itemByRange, lastItem, middleItem, nextItem, previousItem, toSource

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

Polygon [] (index: number)
Returns the Polygon with the specified index.

ParameterTypeDescription
indexnumberThe index.

Polygon add ([layer: Layer][, numberOfSides: number][, insetPercentage: number][, at: LocationOptions=LocationOptions.UNKNOWN][, reference: any][, withProperties: Object])
Creates a new Polygon.

ParameterTypeDescription
layerLayerThe layer on which to create the Polygon. (Optional)
numberOfSidesnumberThe number of sides to give the Polygon. (Range: 3 to 100) (Optional)
insetPercentagenumberThe star inset percentage applied to the Polygon. (Optional)
atLocationOptions:
LocationOptions.BEFORE
LocationOptions.AFTER
LocationOptions.AT_END
LocationOptions.AT_BEGINNING
LocationOptions.UNKNOWN
The location at which to insert the Polygon relative to the reference object or within the container object. (Optional) (default: LocationOptions.UNKNOWN)
referenceDocument
Layer
MasterSpread
Page
PageItem
Spread
The reference object. Note: Required when the at parameter is before or after. Can accept: Document, Spread, MasterSpread, Page, Layer or PageItem. (Optional)
withPropertiesObjectInitial values for properties of the new Polygon (Optional)

Polygon anyItem ()
Returns any Polygon in the collection.

number count ()
Displays the number of elements in the Polygon.

Array of Polygon everyItem ()
Returns every Polygon in the collection.

Polygon firstItem ()
Returns the first Polygon in the collection.

Polygon item (index: any)
Returns the Polygon with the specified index or name.

ParameterTypeDescription
indexLong Integer
String
The index or name. Can accept: Long Integer or String.

Polygon itemByID (id: number)
Returns the Polygon with the specified ID.

ParameterTypeDescription
idnumberThe ID.

Polygon itemByName (name: string)
Returns the Polygon with the specified name.

ParameterTypeDescription
namestringThe name.

Array of Polygon itemByRange (from: any, to: any)
Returns the Polygons within the specified range.

ParameterTypeDescription
fromLong Integer
Polygon
String
The Polygon, index, or name at the beginning of the range. Can accept: Polygon, Long Integer or String.
toLong Integer
Polygon
String
The Polygon, index, or name at the end of the range. Can accept: Polygon, Long Integer or String.

Polygon lastItem ()
Returns the last Polygon in the collection.

Polygon middleItem ()
Returns the middle Polygon in the collection.

Polygon nextItem (obj: Polygon)
Returns the Polygon whose index follows the specified Polygon in the collection.

ParameterTypeDescription
objPolygonThe Polygon whose index comes before the desired Polygon.

Polygon previousItem (obj: Polygon)
Returns the Polygon with the index previous to the specified index.

ParameterTypeDescription
objPolygonThe index of the Polygon that follows the desired Polygon.

string toSource ()
Generates a string which, if executed, will return the Polygon.

Element of

Button.polygons

Cell.polygons

Character.polygons

Document.polygons

Footnote.polygons

GraphicLine.polygons

Group.polygons

InsertionPoint.polygons

Layer.polygons

Line.polygons

MasterSpread.polygons

Oval.polygons

Page.polygons

PageItem.polygons

Paragraph.polygons

Polygon.polygons

Rectangle.polygons

Spread.polygons

State.polygons

Story.polygons

Table.polygons

Text.polygons

TextColumn.polygons

TextFrame.polygons

TextStyleRange.polygons

Word.polygons

Jongware, 20-Jun-2010 v3.0.3dContents :: Index