Adobe 26001360 Scripting Guide - Page 111
Notes, Example 14.1, object represents a gradient as defined in the Illustrator application.
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 111 highlights
Adobe Illustrator CS Scripting Guide 111 Notes Illustrator's gradient object represents a gradient as defined in the Illustrator application. Additional gradients may be created by the user within Illustrator or via a script. Example 14.1 This example shows how to create a linear RGB gradient. -- Create a new RGB gradient with three gradient stops property pGradientName : "RGB Hot Streak" tell application "Illustrator CS" if not (exists gradient pGradientName in current document) then set newgradient to make new gradient at beginning of current document ¬ with properties {name:pGradientName, gradient type:linear} -- Since all new gradients are created with 2 gradient stops, -- create another stop for the 3 stop gradient make new gradient stop at beginning of newgradient set properties of gradient stop 1 of newgradient to ¬ {midpoint:50.0, ramp point:0.0, color:{red:255.0, green:255.0, blue:0.0}} set properties of gradient stop 2 of newgradient to ¬ {midpoint:50.0, ramp point:50.0, color:{red:255.0, green:127.0, blue:127.0}} set properties of gradient stop 3 of newgradient to ¬ {midpoint:50.0, ramp point:100.0, color:{red:255.0, green:0.0, blue:0.0}} end if end tell 12 Aug 03