Donner SVG main
0.8.0 ยท 382bd0190.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::editor::CapturedPresentation Class Reference

Immutable geometry/provenance paired with one render result. More...

#include "donner/editor/CapturedPresentation.h"

Classes

struct  TextEditing
 Text layout annotations captured under the same mutation revision as their glyphs. More...
struct  Object
 Selection geometry attributed to one object, rather than a gesture-wide coordinate guess. More...
struct  Adornment
 Additional annotation geometry anchored to a captured object or its independent ancestor. More...

Public Member Functions

const std::optional< TextEditing > & textEditing () const
 Text annotations owned by this capture and measured against its actual document revision.
const PresentationIdentity & identity () const
 Capture provenance owned by this immutable snapshot.
const std::vector< Entity > & selection () const
 Selected object identities owned by this snapshot.
const std::vector< PresentationPose > & poses () const
 Absolute object poses sampled with the geometry.
const std::vector< Adornment > & adornments () const
 Source-hover and locked-element flash annotations owned by this capture.
const std::vector< Object > & objects () const
 Objects and their uncropped geometry, owned for the lifetime of this capture.
std::optional< PresentationPose > pose (Entity entity) const
 Actual pose consumed by the raster, including tracked objects outside the current selection.
std::vector< Box2d > paintBounds (Entity entity) const
 Conservative paint regions for a tracked object, including objects outside the selection.
bool absent (Entity entity) const
 Whether a previously tracked object was absent from this captured document.
bool canProject (Entity entity) const
 Whether one object's pixels are independent of a fixed ancestor compositing context.
std::vector< Entity > independentlyMovable () const
 Renderer-certified independent objects, preserved by same-scene selection recapture.
Vector2i canvasSize () const
 Canvas dimensions used when the layout and geometry were captured.
Vector2d documentOrigin () const
 Author-space origin removed by the raster tile producer.
bool affinePreviewAllowed () const
 False when selected pixels depend on an ancestor's fixed compositing context.
std::shared_ptr< const svg::DonnerController::HitTestSnapshot > pointerTargets () const
 Hit geometry belonging to these pixels, or null when interaction capture was disabled.

Static Public Member Functions

static std::shared_ptr< const CapturedPresentation > Capture (svg::SVGDocument &document, PresentationIdentity identity, std::span< const svg::SVGElement > selection, std::span< const Entity > tracked={}, std::span< const Entity > independentlyMovable={}, std::span< const svg::SVGElement > sourceHover={}, const std::optional< LockedRejectionFlashInput > &lockedFlash=std::nullopt, const std::optional< svg::SVGElement > &livePath=std::nullopt, const std::optional< TextEditing > &textEditing=std::nullopt, bool capturePointerTargets=false)
 Capture geometry while the caller owns the document state used to render the pixels.

Detailed Description

Immutable geometry/provenance paired with one render result.


Class Documentation

◆ donner::editor::CapturedPresentation::TextEditing

struct donner::editor::CapturedPresentation::TextEditing

Text layout annotations captured under the same mutation revision as their glyphs.

Class Members
Vector2i canvasSize = Vector2i::Zero()
optional< TextCaret > caret
optional< array< Vector2d, 4 > > frame
float frameOpacity = 1.0f
PresentationIdentity identity
vector< array< Vector2d, 4 > > selection
Entity subject = entt::null

◆ donner::editor::CapturedPresentation::Object

struct donner::editor::CapturedPresentation::Object

Selection geometry attributed to one object, rather than a gesture-wide coordinate guess.

Class Members
SelectionChromeSnapshot chrome
Entity entity = entt::null
vector< Box2d > paintBoundsDoc
bool pathBoundsCoverFrame = false

◆ donner::editor::CapturedPresentation::Adornment

struct donner::editor::CapturedPresentation::Adornment

Additional annotation geometry anchored to a captured object or its independent ancestor.

Class Members
SelectionChromeSnapshot chrome
bool lockedFlash = false
Entity owner = entt::null
Entity subject = entt::null

Member Function Documentation

◆ Capture()

std::shared_ptr< const CapturedPresentation > donner::editor::CapturedPresentation::Capture ( svg::SVGDocument & document,
PresentationIdentity identity,
std::span< const svg::SVGElement > selection,
std::span< const Entity > tracked = {},
std::span< const Entity > independentlyMovable = {},
std::span< const svg::SVGElement > sourceHover = {},
const std::optional< LockedRejectionFlashInput > & lockedFlash = std::nullopt,
const std::optional< svg::SVGElement > & livePath = std::nullopt,
const std::optional< TextEditing > & textEditing = std::nullopt,
bool capturePointerTargets = false )
staticnodiscard

Capture geometry while the caller owns the document state used to render the pixels.

Parameters
documentDocument protected by the render's write access.
identityProvenance of that render.
selectionSelected objects in document order.
trackedObjects whose previously displayed poses must survive render adoption.
independentlyMovableRenderer-certified independently owned paint layers.
sourceHoverSource highlights to anchor to this scene.
lockedFlashRejected-selection feedback to anchor to this scene.
livePathOptional solid vector replacement supplying both paint and geometry.
textEditingText annotations accepted only at the capture's actual mutation revision.
capturePointerTargetsCapture immutable mouse hit geometry for Preview.
Returns
Immutable paired geometry, or null when a selected handle belongs to another document.

The documentation for this class was generated from the following file: