Skip to content

API reference / Common / Engine types / ShapeTree

Interface: ShapeTree ​

The shape-tree root — the reusable model root every doc type embeds.

A doc-type structural part (a slide's p:spTree, a worksheet drawing layer, a docx drawing anchor) holds one [ShapeTree] and assembles its whole document tree from it; it composes into the ComposedShapeTree layout root.

The root is a single [ShapeNode] — not a bespoke container. It is conventionally a Group (the container of the top-level shapes), so the root rejoins the one addressable, recursive node type: it carries a [ShapeNodeId], composes through the same ComposedShapeNode::compose path, and contributes its own transform as the tree's walk base (no separate root transform anywhere). PresentationML's p:spTree maps to it 1:1; a host whose drawing is an anchor list (spreadsheet) or a lone object (a word inline drawing) synthesizes or roots a node directly. "The root is a group" holds only when there are several top-level shapes — which is exactly what a group is for.

Properties ​

PropertyDescription
root
ShapeNode
The root node — conventionally a Group.