Bearbeiten

Freigeben über


SKPaint.GetGlyphWidths Method

Definition

Overloads

GetGlyphWidths(IntPtr, IntPtr, SKRect[])

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

GetGlyphWidths(String, SKRect[])

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

GetGlyphWidths(ReadOnlySpan<Char>, SKRect[])
GetGlyphWidths(ReadOnlySpan<Byte>, SKRect[])
GetGlyphWidths(IntPtr, IntPtr)

Retrieves the advance for each glyph in the text.

GetGlyphWidths(IntPtr, Int32, SKRect[])

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

GetGlyphWidths(Byte[], SKRect[])

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

GetGlyphWidths(String)

Retrieves the advance for each glyph in the text.

GetGlyphWidths(ReadOnlySpan<Char>)
GetGlyphWidths(ReadOnlySpan<Byte>)
GetGlyphWidths(IntPtr, Int32)

Retrieves the advance for each glyph in the text.

GetGlyphWidths(Byte[])

Retrieves the advance 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.

Applies to

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.

Applies to

GetGlyphWidths(ReadOnlySpan<Char>, SKRect[])

public float[] GetGlyphWidths (ReadOnlySpan<char> text, out SkiaSharp.SKRect[] bounds);

Parameters

bounds
SKRect[]

Returns

Single[]

Applies to

GetGlyphWidths(ReadOnlySpan<Byte>, SKRect[])

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

Parameters

bounds
SKRect[]

Returns

Single[]

Applies to

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.

Applies to

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

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.

Applies to

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.

Applies to

GetGlyphWidths(ReadOnlySpan<Char>)

public float[] GetGlyphWidths (ReadOnlySpan<char> text);

Parameters

Returns

Single[]

Applies to

GetGlyphWidths(ReadOnlySpan<Byte>)

public float[] GetGlyphWidths (ReadOnlySpan<byte> text);

Parameters

Returns

Single[]

Applies to

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.

Applies to

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.

Applies to