Adobe 26001360 Scripting Guide - Page 333
Gradients, Table 5.37, Gradients - Properties, Gradients - Methods
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 333 highlights
Adobe Illustrator CS Scripting Guide 333 'Modify the first gradient stop. Set locationSpecification = newGradient.GradientStops(1) locationSpecification.RampPoint = 30 locationSpecification.MidPoint = 60 locationSpecification.Color = startColor 'Modify the last gradient stop. 'The MidPoint for the last gradient stop is ignored Set locationSpecification = newGradient.GradientStops(2) locationSpecification.RampPoint = 80 locationSpecification.Color = endColor 'construct an Illustrator.GradientColor object referring to the 'newly created gradient Dim ColorOfGradient As New Illustrator.GradientColor ColorOfGradient.Gradient = newGradient 'now get the frontmost path item and apply the new gradient as its fill Dim topPath As Illustrator.PathItem Set topPath = frontDocument.PathItems(1) topPath.Filled = True topPath.fillColor = ColorOfGradient Gradients A collection of gradients in a document. Table 5.37 Gradients - Properties Property R/O Value type What it is Application Count Parent R/O Application object The Illustrator Application object R/O Long The number of objects in the collection R/O Document object The parent document of this object Table 5.38 Gradients - Methods Method Returns Add() Gradient object Index(item As Gradient) Long 12 Aug 03 What it does Creates a new object Returns the index position of the object within the collection