Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
PresentationPose.h File Reference

Stable object coordinates used by both raster and selection presentation. More...

#include <cstdint>
#include <optional>
#include <span>
#include "donner/base/EcsRegistry.h"
#include "donner/base/Transform.h"
Include dependency graph for PresentationPose.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::editor::PresentationIdentity
 Identity of the document content consumed by one renderer capture. More...
struct  donner::editor::PresentationPose
 An object's absolute pose in the document, independent of mouse gestures. More...

Namespaces

namespace  donner
 Top-level Donner namespace, which is split into different sub-namespaces such as donner::svg and donner::css.

Functions

bool donner::editor::FinitePresentationTransform (const Transform2d &documentFromElement)
 Validate every coefficient of a presentation mapping.
bool donner::editor::SamePresentationTransform (const Transform2d &lhs, const Transform2d &rhs)
 Compare two presentation mappings without changing their reference space.
std::optional< Transform2d > donner::editor::ResolvePresentationTransform (std::span< const PresentationPose > captured, std::span< const PresentationPose > requested)
 Resolve one affine mapping shared by all selected participants.

Detailed Description

Stable object coordinates used by both raster and selection presentation.

Function Documentation

◆ FinitePresentationTransform()

bool donner::editor::FinitePresentationTransform ( const Transform2d & documentFromElement)
nodiscard

Validate every coefficient of a presentation mapping.

Parameters
documentFromElementMapping to inspect.

◆ ResolvePresentationTransform()

std::optional< Transform2d > donner::editor::ResolvePresentationTransform ( std::span< const PresentationPose > captured,
std::span< const PresentationPose > requested )
nodiscard

Resolve one affine mapping shared by all selected participants.

Parameters
capturedPoses belonging to the raster and captured selection geometry.
requestedAbsolute poses chosen by the current input transaction.
Returns
Captured-document to presented-document mapping, or nullopt when no common mapping exists.

◆ SamePresentationTransform()

bool donner::editor::SamePresentationTransform ( const Transform2d & lhs,
const Transform2d & rhs )
nodiscard

Compare two presentation mappings without changing their reference space.

Parameters
lhsFirst mapping.
rhsSecond mapping in the same coordinate spaces.