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

One immutable geometry/resource decision shared by document and selection drawing. More...

#include <memory>
#include <optional>
#include <vector>
#include "donner/editor/CapturedPresentation.h"
#include "donner/editor/GlTextureCache.h"
#include "donner/editor/SelectTool.h"
#include "donner/editor/ViewportState.h"
Include dependency graph for FramePresentation.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::editor::PresentationDecorations
 Transient UI adornments, distinct from selection geometry captured with the document pixels. More...
struct  donner::editor::FramePresentationBuildResult
 A sealed frame, when available, and the exact work needed to complete its presentation. More...
struct  donner::editor::FramePresentationInput
 Input intent consumed once while sealing a frame; draw callbacks cannot consult it later. More...
class  donner::editor::FramePresentation
 Immutable, validated pixel/geometry binding used by every draw pass for a presented frame. More...

Namespaces

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

Enumerations

enum class  donner::editor::FramePresentationFailure {
  None ,
  MissingResources ,
  InvalidInput ,
  MissingOverview ,
  IncompatiblePose ,
  InsufficientCoverage ,
  MissingSelectionGeometry ,
  UploadRefused
}
 The missing proof that prevented an otherwise coherent frame from being installed.

Functions

Transform2d donner::editor::PresentedFramebufferFromDocumentTransform (const ViewportState &viewport, const Vector2d &framebufferFromLogicalScale)
 Resolve one camera mapping shared by pixel and chrome placement.
std::optional< Box2d > donner::editor::PresentedImageClipRect (const Box2d &paneRect, const Box2d &imageRect)
 Intersect the artboard with the pane, refusing invalid or empty rectangles.

Detailed Description

One immutable geometry/resource decision shared by document and selection drawing.

Function Documentation

◆ PresentedFramebufferFromDocumentTransform()

Transform2d donner::editor::PresentedFramebufferFromDocumentTransform ( const ViewportState & viewport,
const Vector2d & framebufferFromLogicalScale )

Resolve one camera mapping shared by pixel and chrome placement.

Parameters
viewportCamera and logical pane geometry.
framebufferFromLogicalScalePhysical pixels per logical pixel, independently per axis.

◆ PresentedImageClipRect()

std::optional< Box2d > donner::editor::PresentedImageClipRect ( const Box2d & paneRect,
const Box2d & imageRect )
nodiscard

Intersect the artboard with the pane, refusing invalid or empty rectangles.

Parameters
paneRectLogical pane clip.
imageRectArtboard extent in the same coordinate space.
Returns
Clip rectangle for presented document pixels, or empty when a corner is not finite or the rectangles do not overlap.