Coordinates; Fixed Points; Zero Point - Adobe 26001360 - Illustrator CS - PC Manual

Scripting guide
Hide thumbs Also See for 26001360 - Illustrator CS - PC:
Table of Contents

Advertisement

44
Scripting Illustrator

Coordinates

Illustrator uses simple two-dimensional geometry to record the position of objects in a
document. The coordinates used in Illustrator are the same as the "traditional" geometric
coordinate system you learned about in school. The horizontal component of a coordinate pair
(or "point") is referred to as "x" and the vertical position is denoted by "y". You can see these
coordinates in the Info palette when you select or create an object in Illustrator.
Illustrator scripting uses a special class called fixed point to receive and return coordinate
data. The fixed point is represented as a list of two items in AppleScript and as a variant array of
two elements in Visual Basic. In both cases, the first item is the horizontal or "x" coordinate,
while the second item is the vertical or "y" coordinate. The position (Position in Visual
Basic) of objects on a document are described with a fixed point.

Fixed points

In AppleScript, a fixed point with an x coordinate of 5.0 and a y coordinate of 10.2 is
represented as a list that looks like this:
{5.0, 10.2}
In Visual Basic, a fixed point with an x coordinate of 5.0 and a y coordinate of 10.2 is represented
as a variant array that looks like this:
Array (5.0, 10.2)
Note that if you declare an array to hold the values of a point, you should pass 1 as the
dimension, since Visual Basic uses index position 0 for the first item in an array.
Dim aPoint(1) As Single
aPoint(0) = 5.0
aPoint(1) = 10.2

Zero point

The zero point (0, 0) for coordinate numbering in Illustrator is in the lower left corner of the
document. On the horizontal axis, coordinates to the right of the ruler's zero point are positive
numbers, and on the vertical axis, coordinates above the zero point are positive. The page
origin (PageOrigin in Visual Basic) of a document defines the lower left corner of the
printable region of the document as a fixed point.
12 Aug 03

Advertisement

Table of Contents
loading

This manual is also suitable for:

Illustrator cs

Table of Contents