Donner 0.8.0-pre
Embeddable browser-grade SVG2 engine
Loading...
Searching...
No Matches
RenderPanePresenter.h File Reference
Include dependency graph for RenderPanePresenter.h:
This graph shows which files directly or indirectly include this file:

Classes

struct  donner::editor::RenderPanePresenterState
struct  donner::editor::RenderPanePresenterCost
 CPU cost counters produced while presenting the render pane. More...
class  donner::editor::RenderPanePresenter

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::ShouldPresentCompositedTile (const GlTextureCache::TileView &tile, Entity suppressedLayerEntity, bool suppressDragTargetTiles=false)
 Return true when a composited tile should be drawn in the render pane.
bool donner::editor::TileMatchesActiveDragPreview (const GlTextureCache::TileView &tile, const std::optional< SelectTool::ActiveDragPreview > &activeDragPreview)
 Return true when tile should receive the current active-drag transform.
bool donner::editor::HasPresentableDragTargetTile (const GlTextureCache &textures, const std::optional< SelectTool::ActiveDragPreview > &activeDragPreview, Entity suppressedLayerEntity, bool suppressDragTargetTiles=false)
 Return true when the presenter can move the active drag target in the current tile set.
bool donner::editor::PresentedTileQuadIntersectsScreenRect (const PresentedTileQuad &tileQuad, const Box2d &screenRect)
 Return true when a presented tile quad has visible overlap with a screen rect.
std::optional< Box2ddonner::editor::PresentedImageClipRect (const Box2d &paneRect, const Box2d &imageRect)
 Return the screen-space clip rect for presented document pixels.

Function Documentation

◆ HasPresentableDragTargetTile()

bool donner::editor::HasPresentableDragTargetTile ( const GlTextureCache & textures,
const std::optional< SelectTool::ActiveDragPreview > & activeDragPreview,
Entity suppressedLayerEntity,
bool suppressDragTargetTiles = false )
nodiscard

Return true when the presenter can move the active drag target in the current tile set.

Parameters
texturesPresentation texture cache.
activeDragPreviewActive drag preview driving presenter-side transforms.
suppressedLayerEntityPromoted entity hidden from presentation.
suppressDragTargetTilesTrue when drag target tiles are globally hidden.

◆ PresentedImageClipRect()

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

Return the screen-space clip rect for presented document pixels.

Parameters
paneRectScreen-space render-pane bounds.
imageRectScreen-space artboard/image bounds.

◆ PresentedTileQuadIntersectsScreenRect()

bool donner::editor::PresentedTileQuadIntersectsScreenRect ( const PresentedTileQuad & tileQuad,
const Box2d & screenRect )
nodiscard

Return true when a presented tile quad has visible overlap with a screen rect.

Parameters
tileQuadOutput-space tile quad from ComputePresentedTileQuad.
screenRectScreen-space clip rect, usually the render pane bounds.

◆ ShouldPresentCompositedTile()

bool donner::editor::ShouldPresentCompositedTile ( const GlTextureCache::TileView & tile,
Entity suppressedLayerEntity,
bool suppressDragTargetTiles = false )
nodiscard

Return true when a composited tile should be drawn in the render pane.

Parameters
tileTile view published by GlTextureCache.
suppressedLayerEntityPromoted entity whose cached or immediate pixels should not be drawn while selection chrome remains visible. Null leaves all entity-owned tiles eligible.
suppressDragTargetTilesTrue when the current selected element is display:none and legacy/metadata-missing elevated drag-target tiles should be hidden as a fallback.

◆ TileMatchesActiveDragPreview()

bool donner::editor::TileMatchesActiveDragPreview ( const GlTextureCache::TileView & tile,
const std::optional< SelectTool::ActiveDragPreview > & activeDragPreview )
nodiscard

Return true when tile should receive the current active-drag transform.

Selection prewarm renders can publish layer tiles before the user starts dragging. Those tiles are valid drag presentation candidates even though their worker-side isDragTarget bit was false at prewarm time.

Parameters
tileTile view published by GlTextureCache.
activeDragPreviewActive drag preview driving presenter-side transforms.