Adobe InDesign CS (3.0) Object Model JS: Gradient

InDesign CS

Class

Gradient

 A gradient. Base Class: Swatch

QuickLinks

duplicate, extractLabel, insertLabel, merge, remove

Hierarchy

Application | Document
Swatch
Gradient
GradientStop

Properties

PropertyTypeAccessDescription
gradientStopsGradientStops readonlyA collection of gradient stops.
idnumber readonlyThe unique ID of the Gradient.
indexnumber readonlyThe index of the Gradient within its containing object.
labelstring r/wA property that can be set to any string.
namestring r/wThe name of the Gradient.
parentApplicationDocument readonlyThe parent of the Gradient (a Application or Document).
propertiesObject r/wA property that allows setting of several properties at the same time.
typeGradientType:
GradientType.LINEAR
GradientType.RADIAL
r/wThe gradient type.

Methods

Instances

Gradient duplicate ()
Duplicates the Gradient.

string extractLabel (key: string)
Gets the label value associated with the specified key.

ParameterTypeDescription
keystringThe key.

void insertLabel (key: string, value: string)
Sets the label to the value associated with the specified key.

ParameterTypeDescription
keystringThe key.
valuestringThe value.

void merge (with: any)
Merge one or more other swatches into this one.

ParameterTypeDescription
with Array of Swatches
String
Swatch
The swatches to merge. Can accept: Array of Swatches, Swatch or String.

void remove (replacingWith: Swatch)
Delete swatch.

ParameterTypeDescription
replacingWithSwatchThe swatch to apply in place of this one

Element of

GradientStop.parent

Return

Gradient Gradient.duplicate ()

Gradient Gradients.add ([withProperties: Object])

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