Expand description
Shape queries (bounds, hit tests, lengths, trimming, resampling, conversion) built on the renderer’s own geometry code.
Points are normalized as in the model; lengths and distances are in pixels of the given size.
Structs§
- Nearest
- The point of a path nearest another.
Functions§
- from_
bez - A pixel path as normalized vertices and tangents. Quadratics are raised to cubics, and a straight closing segment is left implicit.
- hit_
test - The tree path of the front-most fill or stroke that paints the normalized
point. - items
- Every item’s
ItemPath(place in the tree, device path, and bounds), in document order. - nearest_
point - The point of
pathnearest the normalizedpoint, measured in pixels. - path_
lengths - Each subpath’s length in pixels.
- resample_
path pathresampled tocounts[i]evenly spaced vertices on subpathi, so paths with different vertex counts can morph. Tangents are a third of the spacing. Subpaths without a count, or with a count under 2 (3 when closed), are unchanged.- shape_
bounds - The normalized bounds of every item in document order,
Nonefor items that show nothing. Strokes include their width; trims are not listed. - to_path
geometryconverted to a normalized path with the same outline.- trim_
path pathtrimmed the way a trim item in combined mode trims it.