Adobe 26001360 Scripting Guide - Page 337
Notes, Example 23.1, Table 5.43, GradientStops - Methods, GradientStops - Properties
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 337 highlights
Adobe Illustrator CS Scripting Guide Table 5.42 GradientStops - Properties Property R/O Value type Parent R/O Document object 337 What it is The document that contains this gradient stops object Table 5.43 GradientStops - Methods Method Returns What it does Add Index(item As GradientStop) Item(itemKey) RemoveAll() GradientStop object Creates a new object Long Returns the index position of the object within the collection GradientStops object Returns an object reference to the object identified by itemKey; by name or index Nothing Deletes all objects in this collection Notes Illustrator's GradientStop object represents a point on a specific gradient defined in the Illustrator application. Each gradient stop specifies a color change in the containing gradient. Example 23.1 This example illustrates how to add a new gradient stop to an existing gradient. Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim changeGradient As Illustrator.Gradient Dim lastStop As Illustrator.GradientStop Dim newStop As Illustrator.GradientStop Set frontDocument = appRef.ActiveDocument 'Get a reference to the gradient that you want to change Set changeGradient = frontDocument.Gradients(1) 'Get a reference to the gradient stop that is the last one 'before you add a new gradient stop Dim originalCount As Integer originalCount = changeGradient.GradientStops.Count Set lastStop = changeGradient.GradientStops(originalCount) 'add the new gradient stop Set newStop = changeGradient.GradientStops.Add 12 Aug 03