Click or drag to resize
CanvasTextLayoutGetGlyphOrientationTransform Method
Gets a transform matrix to use when drawing a glyph run.

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public static Matrix3x2 GetGlyphOrientationTransform(
	CanvasGlyphOrientation glyphOrientation,
	bool isSideways,
	Vector2 position
)

Parameters

glyphOrientation
Type: Microsoft.Graphics.Canvas.TextCanvasGlyphOrientation
isSideways
Type: SystemBoolean
position
Type: System.NumericsVector2

Return Value

Type: Matrix3x2
Remarks

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.

See Also