Adobe 65009333 Scripting Guide - Page 16

Measurements and positioning, Coordinates, Measurement units

Page 16 highlights

Getting Started Scripting terminology and the InCopy object model 16 3. From the Classes list, select the object you want to view, then click the property or method you want to view in more detail in the Properties and Methods list. The ExtendScript toolkit displays more information on the property or method you selected: For more on using the ExtendScript Toolkit object model viewer, see Creative Suite 4 JavaScript Tools Guide. Measurements and positioning All items and objects in InCopy are positioned on the page according to measurements you specify. It is useful to know how the InCopy coordinate system works and what measurement units it uses. Coordinates InCopy, like every other page-layout and drawing program, uses simple, two-dimensional geometry to set the position of objects on a page or spread. The horizontal component of a coordinate pair is referred to as x; the vertical component, y. You can see these coordinates in the Transform panel or Control when you select an object using the Selection tool. As in the InCopy user interface, coordinates are measured relative to the current location of the ruler's zero point. There is one difference between the coordinates used in InCopy and the coordinate system used in a Geometry textbook: on the InCopy vertical (or y) axis, coordinates below the zero point are positive numbers; coordinates above the zero point are negative numbers. Measurement units When you send measurement values to InCopy, you can send numbers (for example, 14.65) or measurement strings (for example, "1p7.1"). If you send numbers, InCopy uses the publication's current units of measurement; if you send measurement strings (see the table below), InCopy uses the units of measurement specified in the string. InCopy returns coordinates and other measurement values using the publication's current measurement units. In some cases, these units do not resemble the measurement values shown in the InCopy Transform panel. For example, if the current measurement system is picas, InCopy returns fractional values as decimals, rather than using the picas-and-points notation used by the Transform panel. So, for example,

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88

Getting Started
Scripting terminology and the InCopy object model
16
3.
From the Classes list, select the object you want to view, then click the property or method you want
to view in more detail in the Properties and Methods list. The ExtendScript toolkit displays more infor-
mation on the property or method you selected:
For more on using the ExtendScript Toolkit object model viewer, see
Creative Suite 4 JavaScript Tools Guide
.
Measurements and positioning
All items and objects in InCopy are positioned on the page according to measurements you specify. It is
useful to know how the InCopy coordinate system works and what measurement units it uses.
Coordinates
InCopy, like every other page-layout and drawing program, uses simple, two-dimensional geometry to set
the position of objects on a page or spread. The horizontal component of a coordinate pair is referred to as
x
; the vertical component,
y
. You can see these coordinates in the Transform panel or Control when you
select an object using the Selection tool. As in the InCopy user interface, coordinates are measured relative
to the current location of the ruler’s zero point.
There is one difference between the coordinates used in InCopy and the coordinate system used in a
Geometry textbook: on the InCopy vertical (or
y
) axis, coordinates
below
the zero point are positive
numbers; coordinates
above
the zero point are negative numbers.
Measurement units
When you send measurement values to InCopy, you can send numbers (for example, 14.65) or
measurement strings (for example, “1p7.1”). If you send numbers, InCopy uses the publication’s current
units of measurement; if you send measurement strings (see the table below), InCopy uses the units of
measurement specified in the string.
InCopy returns coordinates and other measurement values using the publication’s current measurement
units. In some cases, these units do not resemble the measurement values shown in the InCopy Transform
panel. For example, if the current measurement system is picas, InCopy returns fractional values as
decimals, rather than using the picas-and-points notation used by the Transform panel. So, for example,