Interface: ClusterGeometry
Defined in: api/geometry.ts:189
Per-cluster geometry extracted after layout, in points.
name is the cluster subgraph's name (e.g. cluster6); for nested clusters the name encodes the hierarchy, so no explicit parent link is exposed. x/y/width/height describe the cluster's bounding box, following the same frame convention as BoundsGeometry: with yAxis:'down' (x, y) is the top-left corner; with yAxis:'up' (x, y) is the lower-left corner (native graphviz frame). These are the raw box corners graphviz computed — the same values render() rounds to emit the class="cluster" polygon, so a consumer quantizing to SVG precision gets byte-conformant geometry.
label is the cluster title's placed position and measured size, present only when the cluster declares a label. Unlike the edge port labels, it is not gated on the label's set flag: C draws a cluster label on existence alone (emit.c:3920 has no ->set test, unlike emit_edge_label:2891), so an unplaced one still renders at whatever pos it holds. Gating here would hide geometry render() acts on.
See
- lib/common/types.h:GD_bb (of a cluster subgraph)
- lib/common/types.h:GD_label (textlabel_t.pos / .dimen)
Properties
height
height: number;Defined in: api/geometry.ts:195
label?
optional label?: {
height: number;
width: number;
x: number;
y: number;
};Defined in: api/geometry.ts:202
Cluster label placement, if the cluster has one. x/y are the centre of the label space (matching EdgeGeometry.label, not the box corner x/y above); width/height are its measured size.
height
height: number;width
width: number;x
x: number;y
y: number;See
lib/common/postproc.c:place_graph_label
name
name: string;Defined in: api/geometry.ts:191
Cluster subgraph name (e.g. cluster6); encodes nesting.
width
width: number;Defined in: api/geometry.ts:194
x
x: number;Defined in: api/geometry.ts:192
y
y: number;Defined in: api/geometry.ts:193