TextPathResult class
Holds the complete set of path data for a rendered text string.
Returned by Font.generateGlyphPaths. Contains per-glyph data in glyphs and font metrics in unitsPerEm, ascender, and descender. The flat commands getter translates each glyph's local commands by its GlyphPathResult.positionX into a single text-line coordinate space.
- Available extensions
Constructors
-
TextPathResult({required List<
GlyphPathResult> glyphs, required double unitsPerEm, required double ascender, required double descender, required double scale}) - Creates a TextPathResult with per-glyph data and font metrics.
Properties
- ascender → double
-
Typographic ascender height in the same pixel coordinate space as path commands.
final
-
commands
→ List<
PathCommand> -
All path commands for the full text string in a single coordinate space.
latefinal
- descender → double
-
Typographic descender depth in the same pixel coordinate space as path commands.
final
-
glyphs
→ List<
GlyphPathResult> -
Per-glyph path data in visual left-to-right order.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- scale → double
-
Scale factor applied to path command coordinates:
fontSize / unitsPerEm.final - unitsPerEm → double
-
Design units per em square, used to scale coordinates to pixel sizes.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → List< Map< String, dynamic> > -
Available on TextPathResult, provided by the JsonExporter extension
Returns a List<Map<String, dynamic>> representation of all path commands. -
toPdfContentStream(
) → String -
Available on TextPathResult, provided by the PdfContentStreamExporter extension
Returns PDF path construction operators (PDF 1.7 §8.5.2) for all commands. -
toString(
) → String -
A string representation of this object.
inherited
-
toSvgPathData(
) → String -
Available on TextPathResult, provided by the SvgExporter extension
Returns the SVG path data string (dattribute value) for all commands.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited