SKPaint.GetGlyphWidths Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
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
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
- text
- ReadOnlySpan<Char>
- bounds
- SKRect[]
Returns
Applies to
GetGlyphWidths(ReadOnlySpan<Byte>, SKRect[])
public float[] GetGlyphWidths (ReadOnlySpan<byte> text, out SkiaSharp.SKRect[] bounds);
Parameters
- text
- ReadOnlySpan<Byte>
- bounds
- SKRect[]
Returns
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
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
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
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
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
- text
- ReadOnlySpan<Char>
Returns
Applies to
GetGlyphWidths(ReadOnlySpan<Byte>)
public float[] GetGlyphWidths (ReadOnlySpan<byte> text);
Parameters
- text
- ReadOnlySpan<Byte>
Returns
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
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
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
SkiaSharp