paged.IDML Reference
Geometry & coordinates

PathGeometry

PathGeometry is an IDML page item's outline — GeometryPathType contours of PathPointType anchors with Bézier handles, plus PathOpen, and how an Oval is spelled.

Tier: ProProIIIreference

PathGeometry records a page item's outline anchor by anchor, with Bézier handles, and it is the shape the item is drawn from.

In short Every page item's outline lives in a PathGeometry inside its <Properties> child. It holds one or more GeometryPathType contours; each contour holds a PathPointArray of PathPointType points; each point has an on-curve Anchor and two Bézier handles. PathOpen on a contour says whether it closes. InDesign draws every shape from this path, a rectangle and an <Oval> included: an oval is an ellipse only because its path is one.

The nesting

Rectangle / Oval / Polygon / GraphicLine / TextFrame
└── Properties
    └── PathGeometry
        └── GeometryPathType   PathOpen="false"     one contour
            └── PathPointArray
                ├── PathPointType  Anchor  LeftDirection  RightDirection
                └── …

More than one GeometryPathType makes a compound path. All coordinates are in the item's own space, which its ItemTransform maps into the parent.

PathPointType: an anchor and two handles

Each point carries three x y pairs (x first, unlike GeometricBounds):

  • Anchor: the point the outline passes through;
  • LeftDirection: the handle controlling the curve that arrives at the anchor;
  • RightDirection: the handle controlling the curve that leaves it.

A handle equal to its anchor means no curve on that side. A rectangle's four points set all three pairs equal, so every segment is straight. InDesign walks a rectangle top-left, bottom-left, bottom-right, top-right.

Attribute · PathPointTypeValuesPagedpaged.set
Anchorlist (pt)read · writtenpoints[i].anchor
LeftDirectionlist (pt)read · writtenpoints[i].left
RightDirectionlist (pt)read · writtenpoints[i].right
The 3 attributes real documents use most. All 3 attributes of PathPointType →

GeometryPathType: one contour

PathOpen="false" closes the contour with a segment from the last point back to the first. PathOpen="true" leaves it open: the shape is a stroke that starts and ends at its end anchors. A GraphicLine is a two-point open contour, which may be curved; its ends are its first and last anchors, in the order they are written.

Attribute · GeometryPathTypeValuesPagedpaged.set
PathOpenbooleanread · written
The 1 attributes real documents use most. All 1 attributes of GeometryPathType →

A three-anchor contour with PathOpen="true": two segments and no closing one.

Spreads/Spread_uspread.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Spread xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <Spread Self="uspread" PageCount="1" BindingLocation="0" ShowMasterItems="true" AllowPageShuffle="true" ItemTransform="1 0 0 1 0 0">
    <Page Self="upage" Name="1" AppliedMaster="umaster" ItemTransform="1 0 0 1 0 0" GeometricBounds="0 0 841.89 595.276" MasterPageTransform="1 0 0 1 0 0"/>
    <Polygon Self="uline" ItemTransform="1 0 0 1 150 250" FillColor="Swatch/None" StrokeColor="Color/Black" StrokeWeight="4">
      <Properties>
        <PathGeometry>
          <GeometryPathType PathOpen="true">
            <PathPointArray>
              <PathPointType Anchor="0 0" LeftDirection="0 0" RightDirection="0 0"/>
              <PathPointType Anchor="150 200" LeftDirection="150 200" RightDirection="150 200"/>
              <PathPointType Anchor="300 0" LeftDirection="300 0" RightDirection="300 0"/>
            </PathPointArray>
          </GeometryPathType>
        </PathGeometry>
      </Properties>
    </Polygon>
    <TextFrame Self="uframe" ParentStory="ustory" PreviousTextFrame="n" NextTextFrame="n" ContentType="TextType" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 57.638 145.8237" FillColor="Swatch/None" StrokeColor="Swatch/None" StrokeWeight="0">
      <Properties>
        <PathGeometry>
          <GeometryPathType PathOpen="false">
            <PathPointArray>
              <PathPointType Anchor="0 0" LeftDirection="0 0" RightDirection="0 0"/>
              <PathPointType Anchor="0 400" LeftDirection="0 400" RightDirection="0 400"/>
              <PathPointType Anchor="480 400" LeftDirection="480 400" RightDirection="480 400"/>
              <PathPointType Anchor="480 0" LeftDirection="480 0" RightDirection="480 0"/>
            </PathPointArray>
          </GeometryPathType>
        </PathGeometry>
      </Properties>
    </TextFrame>
  </Spread>
</idPkg:Spread>

Set PathOpen to false and the chevron closes into a triangle.

How an <Oval> is spelled

An <Oval> is drawn from its path like any other shape. InDesign writes an ellipse as four anchors at the midpoints of its bounding box's edges, in the order bottom, right, top, left, each with handles along its edge at κ·r from the anchor, where κ = 0.5523 and r is the half-width (for the horizontal handles) or half-height (for the vertical ones). An <Oval> whose path is four corner points is drawn by InDesign as a rectangle.

A Rectangle with four corner anchors, and an Oval with InDesign's four mid-edge anchors and κ·r handles: a 240 pt circle.

Spreads/Spread_uspread.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<idPkg:Spread xmlns:idPkg="http://ns.adobe.com/AdobeInDesign/idml/1.0/packaging" DOMVersion="20.0">
  <Spread Self="uspread" PageCount="1" BindingLocation="0" ShowMasterItems="true" AllowPageShuffle="true" ItemTransform="1 0 0 1 0 0">
    <Page Self="upage" Name="1" AppliedMaster="umaster" ItemTransform="1 0 0 1 0 0" GeometricBounds="0 0 841.89 595.276" MasterPageTransform="1 0 0 1 0 0"/>
    <Rectangle Self="urect" ContentType="GraphicType" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 80 100" FillColor="Color/Red" StrokeColor="Swatch/None" StrokeWeight="0">
      <Properties>
        <PathGeometry>
          <GeometryPathType PathOpen="false">
            <PathPointArray>
              <PathPointType Anchor="0 0" LeftDirection="0 0" RightDirection="0 0"/>
              <PathPointType Anchor="0 200" LeftDirection="0 200" RightDirection="0 200"/>
              <PathPointType Anchor="300 200" LeftDirection="300 200" RightDirection="300 200"/>
              <PathPointType Anchor="300 0" LeftDirection="300 0" RightDirection="300 0"/>
            </PathPointArray>
          </GeometryPathType>
        </PathGeometry>
      </Properties>
    </Rectangle>
    <Oval Self="uoval" ContentType="GraphicType" AppliedObjectStyle="ObjectStyle/$ID/[None]" Visible="true" Name="$ID/" ItemTransform="1 0 0 1 200 380" FillColor="Color/Blue" StrokeColor="Swatch/None" StrokeWeight="0">
      <Properties>
        <PathGeometry>
          <GeometryPathType PathOpen="false">
            <PathPointArray>
              <PathPointType Anchor="120 240" LeftDirection="53.7258 240" RightDirection="186.2742 240"/>
              <PathPointType Anchor="240 120" LeftDirection="240 186.2742" RightDirection="240 53.7258"/>
              <PathPointType Anchor="120 0" LeftDirection="186.2742 0" RightDirection="53.7258 0"/>
              <PathPointType Anchor="0 120" LeftDirection="0 53.7258" RightDirection="0 186.2742"/>
            </PathPointArray>
          </GeometryPathType>
        </PathGeometry>
      </Properties>
    </Oval>
  </Spread>
</idPkg:Spread>

Corner options

A rectangle's corners can be shaped without changing its path: CornerOption with CornerRadius applies to all four corners, and TopLeftCornerOption, TopLeftCornerRadius and their siblings override single corners. The values InDesign writes are None, RoundedCorner, InverseRoundedCorner, InsetCorner, BevelCorner and FancyCorner. The path keeps the square corners; the treatment is applied on top.

In Paged: all five treatments draw their own corner geometry, with per-corner radii. Supported · verified On polygons the support is partial.

Parsed, partly rendered

What else rides on a path

  • Strokes follow the path: StrokeWeight, StrokeType (solid, dashed, dotted, striped, wavy and custom stroke styles), StrokeAlignment, EndCap, EndJoin, and line ends on open paths. See page-item types.
  • Text on a path: a <TextPath> child flows a story along the item's outline. Supported · verified

Frequently asked questions

How are the path elements nested? PathGeometry holds GeometryPathType contours; each holds a PathPointArray of PathPointType points; each point has an Anchor, a LeftDirection and a RightDirection. The whole block sits inside the item's <Properties>.

What coordinate order do path points use? x y, horizontal first, in the item's own space. GeometricBounds is the one geometry value that puts y first.

How do I write an ellipse? As an <Oval> with four anchors at the edge midpoints (bottom, right, top, left), each with handles 0.5523 × the radius along its edge. Four corner anchors make InDesign draw a rectangle, whatever the element is called.

What does PathOpen do? It decides per contour whether the last point joins back to the first. false (the default) closes the contour; true leaves it open.

On this page