Adobe InDesign CS3 (5.0) Object Model JS: Graphics

InDesign CS3

Class

Graphics

 A collection of imported graphics in any graphic file format (vector, metafile, or bitmap).

QuickLinks

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

Graphic anyItem ()
Returns any Graphic in the collection.

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

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

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

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

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

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

ParameterTypeDescription
idnumberThe ID.

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

ParameterTypeDescription
namestringThe name.

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

ParameterTypeDescription
fromGraphic
Long Integer
String
The Graphic, index, or name at the beginning of the range. Can accept: Graphic, Long Integer or String.
toGraphic
Long Integer
String
The Graphic, index, or name at the end of the range. Can accept: Graphic, Long Integer or String.

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

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

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

ParameterTypeDescription
objGraphicThe Graphic whose index comes before the desired Graphic.

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

ParameterTypeDescription
objGraphicThe index of the Graphic that follows the desired Graphic.

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

Element of

Button.graphics

GraphicLine.graphics

Group.graphics

Oval.graphics

Page.masterPageItems

PageItem.graphics

Polygon.graphics

Rectangle.graphics

State.graphics

Used in:

Asset Library.store (using: Array of any[, withProperties: Object])

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