Adobe 26001360 Scripting Guide - Page 335
Notes, Example 22.1, Table 5.39, GradientColor - Properties Continued
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 335 highlights
Adobe Illustrator CS Scripting Guide 335 Table 5.39 GradientColor - Properties (Continued) Property R/O Value type HiliteLength Length Matrix Double Double Matrix object Origin Variant Array (of 2 Doubles) What it is The gradient hilite vector length The gradient vector length An additional transformation matrix to manipulate the gradient path The gradient vector origin Notes A GradientColor can be created using a reference to an existing gradient in the application. If no existing gradient object is referenced, a default gradient will be supplied. An origin is used to specify the center point of the gradient in this specific gradient color. Single values are used to specify the gradient vector angles and lengths. A matrix may be specified to further transform the gradient color. Example 22.1 The following script obtains the gradient called "Black, White Radial" from the current document and changes the color of the first gradient stop. The Gradient "Black, White Radial"is one of the default gradients that appear when you create a new Illustrator document. Dim appRef As New Illustrator.Application Dim frontDocument As Illustrator.Document Dim firstGradient As Illustrator.Gradient Set frontDocument = appRef.ActiveDocument 'Get a reference to the gradient that you want to delete Set firstGradient = frontDocument.Gradients("White, Black Radial") 'Create the new color Dim startColor As New Illustrator.RGBColor startColor.Red = 255 startColor.Green = 238 startColor.Blue = 98 firstGradient.GradientStops(1).Color = startColor 12 Aug 03