Donner SVG 0.8.0-pre
SVG editor and embeddable C⁠+⁠+⁠20 engine.
Loading...
Searching...
No Matches
donner::Path::MeasuredPath Class Reference

Precomputed arc-length index for repeated path sampling. More...

#include "donner/base/Path.h"

Public Member Functions

double pathLength () const
 Return the total measured arc length.
PointOnPath pointAtArcLength (double distance) const
 Sample this measured path at the given arc length.
std::size_t segmentCount () const
 Number of drawable segments retained by this index.
bool valid () const
 Return true when measurement completed within its numeric and work limits.
std::size_t measurementWorkUnits () const
 Number of command visits and recursive subdivisions used to build this index.
std::optional< std::size_t > retainedBytes () const
 Exact object and vector-capacity bytes retained by this index, or nullopt on overflow.

Friends

class Path

Detailed Description

Precomputed arc-length index for repeated path sampling.

Construction is linear in the number of path commands. Sampling uses a binary search over drawable segments, so text-on-path does not rescan the complete source path once per glyph.


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