CanvasTextLayoutGetGlyphOrientationTransform Method |
Namespace: Microsoft.Graphics.Canvas.Text
public static Matrix3x2 GetGlyphOrientationTransform( CanvasGlyphOrientation glyphOrientation, bool isSideways, Vector2 position )
The returned transform matrix has the correct rotation and translation components for drawing text at the specified position and orientation. Custom text renderers can use this method to determine glyph rotation, particularly if they wish to pass the DrawGlyphRun call along to CanvasDrawingSession.DrawGlyphRun, since CanvasDrawingSession.DrawGlyphRun doesn't auto-rotate glyphs.
Moreover, this method exists for apps which want to draw a glyph run using something other than the built-in renderer, CanvasDrawingSession.
Apps shouldn't use this method when constructing geometry from text; Win2D bakes that transform into the geometry.