Frozen view of everything OverlayRenderer::drawChromeWithTransform would normally read off the live registry: per-element path splines transformed into document space, per-element AABBs in document space, and the optional marquee rect.
More...
#include "donner/editor/OverlayRenderer.h"
|
| struct | OrientedBox |
| | Four document-space corners of an oriented selection box. More...
|
| struct | PathItem |
| | One entry per renderable geometry leaf in the selection (groups are expanded into their geometry descendants, same as the live path). Empty when nothing's selected. More...
|
|
|
std::vector< PathItem > | paths |
|
std::vector< PathItem > | hoverPaths |
| | Transient source-hover path outlines. Drawn as soft hover chrome before selection chrome.
|
|
std::vector< Box2d > | aabbsDoc |
| | Per-element AABBs in document space (from SnapshotSelectionWorldBounds). Drawn with canvasFromDoc applied at compose time so they line up with the rendered content for the same DOM frame.
|
|
std::vector< Box2d > | hoverAabbsDoc |
| | Bounds for the transient source-hover elements.
|
|
std::optional< Box2d > | marqueeDoc |
| | Optional marquee rectangle in document space.
|
|
std::optional< OrientedBox > | orientedBoundsDoc |
| | Optional oriented bounds drawn instead of axis-aligned AABBs while a rotation gesture is active.
|
|
std::vector< Box2d > | handleBoxesDoc |
| | Corner resize handles in document space. Empty when there is no selection AABB.
|
|
Transform2d | canvasFromDoc |
| | canvasFromDoc at capture time. The draw phase needs this for drawing AABBs and the marquee (both live in doc space).
|
|
double | selectionStrokeWidthWorld = 0.0 |
| | World-space stroke widths derived from the snapshot's canvasFromDoc scale, pre-computed so the draw phase doesn't have to recompute anything that depends on registry state.
|
|
double | hoverStrokeWidthWorld = 0.0 |
|
double | marqueeStrokeWidthWorld = 0.0 |
Frozen view of everything OverlayRenderer::drawChromeWithTransform would normally read off the live registry: per-element path splines transformed into document space, per-element AABBs in document space, and the optional marquee rect.
Captured once via OverlayRenderer::captureChromeSnapshot while the registry is safe to read (worker is idle), then handed to OverlayRenderer::drawChromeFromSnapshot which is race-free — it touches only the snapshot, never the registry.
Design doc 0033 §M7. Lets the chrome rasterize run while the worker is mid-render, so the editor can paint selection chrome in a frame that the worker hasn't returned a result for yet.
◆ donner::editor::SelectionChromeSnapshot::OrientedBox
| struct donner::editor::SelectionChromeSnapshot::OrientedBox |
Four document-space corners of an oriented selection box.
| Class Members |
|
array< Vector2d, 4 > |
cornersDoc |
|
◆ donner::editor::SelectionChromeSnapshot::PathItem
| struct donner::editor::SelectionChromeSnapshot::PathItem |
One entry per renderable geometry leaf in the selection (groups are expanded into their geometry descendants, same as the live path). Empty when nothing's selected.
| Class Members |
|
bool |
displayNone = false |
True when the selected element is hidden by display:none. The path outline still renders as an editable placeholder, but uses a dimmer stroke than visible selections. |
|
Path |
pathDoc |
Document-space path data sampled at capture time. Keeping the path in document space lets chrome stroke width depend only on viewport scale, not on the selected element's own scale/rotation transform. |
◆ aabbsDoc
| std::vector<Box2d> donner::editor::SelectionChromeSnapshot::aabbsDoc |
◆ canvasFromDoc
| Transform2d donner::editor::SelectionChromeSnapshot::canvasFromDoc |
canvasFromDoc at capture time. The draw phase needs this for drawing AABBs and the marquee (both live in doc space).
◆ handleBoxesDoc
| std::vector<Box2d> donner::editor::SelectionChromeSnapshot::handleBoxesDoc |
Corner resize handles in document space. Empty when there is no selection AABB.
◆ hoverAabbsDoc
| std::vector<Box2d> donner::editor::SelectionChromeSnapshot::hoverAabbsDoc |
Bounds for the transient source-hover elements.
◆ hoverPaths
| std::vector<PathItem> donner::editor::SelectionChromeSnapshot::hoverPaths |
Transient source-hover path outlines. Drawn as soft hover chrome before selection chrome.
◆ hoverStrokeWidthWorld
| double donner::editor::SelectionChromeSnapshot::hoverStrokeWidthWorld = 0.0 |
◆ marqueeDoc
| std::optional<Box2d> donner::editor::SelectionChromeSnapshot::marqueeDoc |
Optional marquee rectangle in document space.
◆ marqueeStrokeWidthWorld
| double donner::editor::SelectionChromeSnapshot::marqueeStrokeWidthWorld = 0.0 |
◆ orientedBoundsDoc
| std::optional<OrientedBox> donner::editor::SelectionChromeSnapshot::orientedBoundsDoc |
Optional oriented bounds drawn instead of axis-aligned AABBs while a rotation gesture is active.
◆ paths
| std::vector<PathItem> donner::editor::SelectionChromeSnapshot::paths |
◆ selectionStrokeWidthWorld
| double donner::editor::SelectionChromeSnapshot::selectionStrokeWidthWorld = 0.0 |
World-space stroke widths derived from the snapshot's canvasFromDoc scale, pre-computed so the draw phase doesn't have to recompute anything that depends on registry state.
The documentation for this struct was generated from the following file: