Adobe 26001360 Scripting Guide - Page 209
rectangle, Valid Commands, Notes, Example 55.1
UPC - 718659321840
View all Adobe 26001360 manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 209 highlights
Adobe Illustrator CS Scripting Guide 209 rectangle A class used to create a rectangular path in an Illustrator document. This class can only be used to create new path item objects. Stored as a list of four real numbers, where the first item is the leftmost horizontal coordinate of the rectangle, the second item is the top vertical coordinate of the rectangle, the third item is the rightmost horizontal coordinate, and the fourth item is the bottom vertical coordinate of the rectangle. Table 4.78 rectangle - Properties Property R/O Value type bounds W/O list reversed W/O boolean What it is The bounds of the rectangle default: {100.0, 200.0, 175.0, 100.0} If true, the path is reversed default: false Valid Commands • make Notes The rectangle class can only be used with the make command. The class of the object created will be a path item. Therefore, the properties for a rectangle 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. Properties associated with path items, such as fill color and note, can also be specified at the time of creation. Note: Remember that in the Illustrator coordinate system, vertical coordinates increase from bottom to top, which is the opposite of screen coordinates. This mean that the top coordinate value in a rectangle will be larger than the bottom coordinate value. Example 55.1 This example demonstrates how to create a square rectangle with a note. -- Make a square in document 1 tell application "Illustrator CS" set pathRef to make new rectangle at beginning of document 1 ¬ with properties {bounds:{50.0, 200.0, 200.0, 50.0}, note:"square"} end tell 12 Aug 03