Adobe InDesign CS3 (5.0) Object Model JS: GradientStops

InDesign CS3

Class

GradientStops

 A collection of gradient stops.

QuickLinks

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

Properties

PropertyTypeAccessDescription
lengthnumber readonlyThe number of objects in the collection.

Methods

Instances

GradientStop add ([withProperties: Object])
Creates a new GradientStop.

ParameterTypeDescription
withPropertiesObjectInitial values for properties of the new GradientStop (Optional)

GradientStop anyItem ()
Returns any GradientStop in the collection.

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

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

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

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

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

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

ParameterTypeDescription
namestringThe name.

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

ParameterTypeDescription
fromGradientStop
Long Integer
String
The GradientStop, index, or name at the beginning of the range. Can accept: GradientStop, Long Integer or String.
toGradientStop
Long Integer
String
The GradientStop, index, or name at the end of the range. Can accept: GradientStop, Long Integer or String.

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

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

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

ParameterTypeDescription
objGradientStopThe GradientStop whose index comes before the desired GradientStop.

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

ParameterTypeDescription
objGradientStopThe index of the GradientStop that follows the desired GradientStop.

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

Element of

Gradient.gradientStops

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