Donner SVG 0.8.0
0.8.0 ยท ebf353960.8.0 main
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::svg::components::RenderingContext::HitGeometry Struct Reference

Evaluated pointer-event geometry shared by live queries and immutable frame captures. More...

#include "donner/svg/renderer/RenderingContext.h"

Public Member Functions

bool contains (const Vector2d &point, const Path *path) const
 Test a point using an optional prepared path borrowed for the duration of this call.

Public Attributes

Box2d documentBounds
 Shape bounds in document space, inflated by the stroke width.
std::optional< Box2d > textBounds
 Text ink bounds in entity space; set for text roots.
Transform2d entityFromDocumentTransform
 Maps document-space points to entity space.
FillRule fillRule = FillRule::NonZero
 Computed fill rule for the fill test.
double strokeWidth = 0.0
 Computed stroke width, or zero when the stroke is unpainted.
bool testFill = false
 Whether the fill area is hit-testable.
bool testStroke = false
 Whether the stroke area is hit-testable.
bool boundsOnly = false
 Whether pointer-events: bounding-box hits the whole bounds.

Detailed Description

Evaluated pointer-event geometry shared by live queries and immutable frame captures.

Member Function Documentation

◆ contains()

bool donner::svg::components::RenderingContext::HitGeometry::contains ( const Vector2d & point,
const Path * path ) const

Test a point using an optional prepared path borrowed for the duration of this call.

Parameters
pointDocument-space point.
pathPrepared shape path, or null for bounds.

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