Adobe 26001360 Scripting Guide - Page 199
polygon, Valid Commands, Notes, Example 49.1
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 199 highlights
Adobe Illustrator CS Scripting Guide 199 polygon A class used to create a multi-sided path in an Illustrator document. This class can only be used to create new path item objects. Table 4.70 polygon - Properties Property R/O Value type What it is center point radius reversed sides W/O fixed point The center point for the polygon; default: {200.0, 300.0} W/O real The radius of the polygon's points; default: 50.0 W/O boolean If true, the polygon path is reversed; default: false W/O integer (unsigned) The number of sides for the polygon; default: 8 Valid Commands • make Notes Illustrator's polygon object is available to use with the make command exclusively. The class of the object created will be a path item. Therefore, the properties for a polygon are write-once (W/O) in the sense that they can be used only to specify the creation of a new path item. This special class allows you to quickly create complex path items using the properties provided. If you do not specify any properties when making a new polygon, default values will be used. Properties usually associated with path items, such as fill color, can also be specified at the time of creation. Example 49.1 This sample demonstrates how to create a polygon. -- Make an octagon in document 1 tell application "Illustrator CS" set pathRef to make new polygon in document 1 with properties ¬ {center point:{200.0, 200.0}, radius:40.0, sides:8} end tell 12 Aug 03