Click or drag to resize
CanvasFontFaceGetGlyphRunBounds Method (CanvasDrawingSession, Vector2, Single, CanvasGlyph, Boolean, UInt32, CanvasTextMeasuringMode)
Gets the bounds of a glyph run using this font face, using the specified measuring mode.

Namespace:  Microsoft.Graphics.Canvas.Text
Assembly:  Microsoft.Graphics.Canvas (in Microsoft.Graphics.Canvas.dll) Version: 0.0.0.0
Syntax
C#
public Rect GetGlyphRunBounds(
	CanvasDrawingSession drawingSession,
	Vector2 point,
	float fontSize,
	CanvasGlyph[] glyphs,
	bool isSideways,
	uint bidiLevel,
	CanvasTextMeasuringMode measuringMode
)

Parameters

drawingSession
Type: Microsoft.Graphics.CanvasCanvasDrawingSession
point
Type: System.NumericsVector2
fontSize
Type: SystemSingle
glyphs
Type: Microsoft.Graphics.Canvas.TextCanvasGlyph
isSideways
Type: SystemBoolean
bidiLevel
Type: SystemUInt32
measuringMode
Type: Microsoft.Graphics.Canvas.TextCanvasTextMeasuringMode

Return Value

Type: Rect
Remarks

An app's DrawGlyphRun callback in its custom text renderer can use this method to get the bounds of a glyph run if it were drawn to a particular drawing session.

This method returns layout bounds, not draw bounds. For more information on the difference between the two, see LayoutBounds.

The returned bounds reflect the DPI, transform and unit mode of the CanvasDrawingSession passed in.

See Also