PeachDrawing.Core
PeachDrawing.Core.PathText
PathText.GetGlyphFrame(PathMeasure, double, PathTextSide, double, double) Method
The transform that puts a glyph centred on a point of a path and turns it to follow the path there. In the glyph’s own space the origin is the glyph’s centre on its baseline.
public static System.Nullable<System.Numerics.Matrix3x2> GetGlyphFrame(PeachDrawing.Core.Geometry.PathMeasure path, double distance, PeachDrawing.Core.PathTextSide side=PeachDrawing.Core.PathTextSide.Left, double normalOffset=0.0, double rotationDegrees=0.0);
Parameters
path PathMeasure
the measured path
distance System.Double
where the glyph’s centre goes, measured from the start of the path (or, for Right, from its end)
side PathTextSide
which side of the path the text sits on
normalOffset System.Double
how far to move the glyph perpendicular to the path: positive moves it to the right of the direction of travel (below the path, for one running left to right on a y-down canvas)
rotationDegrees System.Double
extra rotation, in degrees, applied on top of following the path
Returns
System.Nullable<System.Numerics.Matrix3x2>
the transform, or null when distance falls off either end of the path