Coordinate convention
One convention is used by every MCP tool and by the design-plan schema:
- Origin: the top-left corner of the target artboard (the active artboard unless a tool takes
artboard). - Axes:
xgrows to the right,ygrows down (like CSS/SVG). - Units: tools use the session units (initially
pt; change withset_document_unitsor passunitsper call). Design plans usedocument.units(defaultmm). - Font sizes, leading, stroke widths and effect offsets are always points, regardless of units.
- Shapes:
x/yis the top-left of the bounding box, exceptcircle,polygonandstar, wherex/y(orcx/cy) is the center. - Text:
yis the top of the text bounds. For point text withalign: center|right,xis the anchor line. - Bounds returned by inspect tools are in points in the same space:
{ x, y, width, height }.
Illustrator’s scripting artboard coordinate system has y growing up; the bridge negates y
(toIllustratorPoint in src/utils/units.ts, MCP.box/MCP.moveTo in illustrator-scripts/bootstrap.jsx).
| Unit | Points |
|---|---|
| pt, px | 1 |
| pc | 12 |
| in | 72 |
| cm | 28.3465 |
| mm | 2.83465 |