SKPaint.GetGlyphWidths Method

Definition

Overloads

GetGlyphWidths(IntPtr, IntPtr, SKRect[])

Retrieves the advance and bounds for each glyph in the text.

GetGlyphWidths(Byte[])

Retrieves the advance for each glyph in the text.

GetGlyphWidths(String)

Retrieves the advance for each glyph in the text.

GetGlyphWidths(Byte[], SKRect[])

Retrieves the advance and bounds for each glyph in the text.

GetGlyphWidths(IntPtr, Int32)

Retrieves the advance for each glyph in the text.

GetGlyphWidths(IntPtr, IntPtr)

Retrieves the advance for each glyph in the text.

GetGlyphWidths(String, SKRect[])

Retrieves the advance and bounds for each glyph in the text.

GetGlyphWidths(IntPtr, Int32, SKRect[])

Retrieves the advance and bounds for each glyph in the text.

GetGlyphWidths(IntPtr, IntPtr, SKRect[])

Retrieves the advance and bounds for each glyph in the text.

public float[] GetGlyphWidths (IntPtr text, IntPtr length, out SkiaSharp.SKRect[] bounds);

Parameters

text
IntPtr

The text buffer encoded using the encoding specified in TextEncoding format.

length
IntPtr

The length of the text buffer.

bounds
SKRect[]

The bounds for each glyph relative to (0, 0).

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths and bounds.

GetGlyphWidths(Byte[])

Retrieves the advance for each glyph in the text.

public float[] GetGlyphWidths (byte[] text);

Parameters

text
Byte[]

The text encoded using the encoding specified in TextEncoding format.

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths.

GetGlyphWidths(String)

Retrieves the advance for each glyph in the text.

public float[] GetGlyphWidths (string text);

Parameters

text
String

The text.

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths.

GetGlyphWidths(Byte[], SKRect[])

Retrieves the advance and bounds for each glyph in the text.

public float[] GetGlyphWidths (byte[] text, out SkiaSharp.SKRect[] bounds);

Parameters

text
Byte[]

The text encoded using the encoding specified in TextEncoding format.

bounds
SKRect[]

The bounds for each glyph relative to (0, 0).

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths and bounds.

GetGlyphWidths(IntPtr, Int32)

Retrieves the advance for each glyph in the text.

public float[] GetGlyphWidths (IntPtr text, int length);

Parameters

text
IntPtr

The text buffer encoded using the encoding specified in TextEncoding format.

length
Int32

The length of the text buffer.

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths.

GetGlyphWidths(IntPtr, IntPtr)

Retrieves the advance for each glyph in the text.

public float[] GetGlyphWidths (IntPtr text, IntPtr length);

Parameters

text
IntPtr

The text buffer encoded using the encoding specified in TextEncoding format.

length
IntPtr

The length of the text buffer.

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths.

GetGlyphWidths(String, SKRect[])

Retrieves the advance and bounds for each glyph in the text.

public float[] GetGlyphWidths (string text, out SkiaSharp.SKRect[] bounds);

Parameters

text
String

The text.

bounds
SKRect[]

The bounds for each glyph relative to (0, 0).

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths and bounds.

GetGlyphWidths(IntPtr, Int32, SKRect[])

Retrieves the advance and bounds for each glyph in the text.

public float[] GetGlyphWidths (IntPtr text, int length, out SkiaSharp.SKRect[] bounds);

Parameters

text
IntPtr

The text buffer encoded using the encoding specified in TextEncoding format.

length
Int32

The length of the text buffer.

bounds
SKRect[]

The bounds for each glyph relative to (0, 0).

Returns

Single[]

Returns the text advances for each glyph.

Remarks

If IsVerticalText is false, this method returns the horizontal advance. If IsVerticalText is true, this method returns the vertical advance.

Uses TextEncoding to decode text, Typeface to get the font metrics, and TextSize to scale the widths and bounds.

Applies to