Precomputed arc-length index for repeated path sampling. More...
#include "donner/base/Path.h"
Public Types | |
| enum class | BoundarySide : uint8_t { Incoming , Outgoing } |
| Side of a connected segment boundary used for its tangent and normal. More... | |
Public Member Functions | |
| double | pathLength () const |
| Return the total measured arc length, or infinity when the measurement is not valid. | |
| PointOnPath | pointAtArcLength (double distance, BoundarySide boundarySide=BoundarySide::Incoming) const |
| Sample this measured path at the given arc length. | |
| std::vector< double > | segmentEndDistances () const |
| Return an owning list of cumulative distances at the drawable segment endpoints. | |
| 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 |
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.
|
strong |