Click or drag to resize
CanvasDrawingSessionDrawGlyphRun Method (Vector2, CanvasFontFace, Single, CanvasGlyph, Boolean, UInt32, ICanvasBrush)
Draws a sequence of text characters which share the same formatting.

Namespace:  Microsoft.Graphics.Canvas
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public void DrawGlyphRun(
	Vector2 point,
	CanvasFontFace fontFace,
	float fontSize,
	CanvasGlyph[] glyphs,
	bool isSideways,
	uint bidiLevel,
	ICanvasBrush brush
)

Parameters

point
Type: System.NumericsVector2
fontFace
Type: Microsoft.Graphics.Canvas.TextCanvasFontFace
fontSize
Type: SystemSingle
glyphs
Type: Microsoft.Graphics.Canvas.TextCanvasGlyph
isSideways
Type: SystemBoolean
bidiLevel
Type: SystemUInt32
brush
Type: Microsoft.Graphics.Canvas.BrushesICanvasBrush
Remarks

The typical way to use this method is from the DrawGlyphRun(Vector2, CanvasFontFace, Single, CanvasGlyph, Boolean, UInt32, Object, CanvasTextMeasuringMode, String, String, Int32, UInt32, CanvasGlyphOrientation) method, in an application's implementation of ICanvasTextRenderer, rather than to call it standalone. In particular, an application may want to adjust the properties of a glyph run, such as its positioning or font, before passing it on to be drawn by a CanvasDrawingSession.

This method's position parameter is different from the position used with DrawToTextRenderer Overload. For DrawToTextRenderer, the position represents the top left corner of the layout box. For this method, the position is the baseline origin. For typical rendering with Latin scripts, the baseline is going to fall below the top left corner of the layout box.

This will use a default measuring mode of Natural.

See Also