SKPaint.BreakText Method

Definition

Overloads

BreakText(Byte[], Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

BreakText(ReadOnlySpan<Byte>, Single)
BreakText(ReadOnlySpan<Char>, Single)
BreakText(String, Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

BreakText(Byte[], Single, Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

BreakText(IntPtr, Int32, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

BreakText(IntPtr, IntPtr, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

BreakText(ReadOnlySpan<Byte>, Single, Single)
BreakText(ReadOnlySpan<Char>, Single, Single)
BreakText(String, Single, Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

BreakText(IntPtr, Int32, Single, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

BreakText(IntPtr, IntPtr, Single, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

BreakText(String, Single, Single, String)

Measure the text, stopping early if the measured width exceeds maxWidth.

BreakText(Byte[], Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

public long BreakText (byte[] text, float maxWidth);

Parameters

text
Byte[]

The text to be measured.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

Returns

Int64

Returns the number of bytes of text that were measured.

Applies to

BreakText(ReadOnlySpan<Byte>, Single)

public long BreakText (ReadOnlySpan<byte> text, float maxWidth);

Parameters

maxWidth
Single

Returns

Int64

Applies to

BreakText(ReadOnlySpan<Char>, Single)

public long BreakText (ReadOnlySpan<char> text, float maxWidth);

Parameters

maxWidth
Single

Returns

Int64

Applies to

BreakText(String, Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

public long BreakText (string text, float maxWidth);

Parameters

text
String

The text to be measured.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

Returns

Int64

Returns the number of characters of text that were measured.

Applies to

BreakText(Byte[], Single, Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

public long BreakText (byte[] text, float maxWidth, out float measuredWidth);

Parameters

text
Byte[]

The text to be measured.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

measuredWidth
Single

The actual width of the measured text.

Returns

Int64

Returns the number of bytes of text that were measured.

Applies to

BreakText(IntPtr, Int32, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

public long BreakText (IntPtr buffer, int length, float maxWidth);

Parameters

buffer
IntPtr

The pointer to a region holding text encoded using the encoding specified in TextEncoding format.

length
Int32

The number of bytes to read from the buffer.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

Returns

Int64

Returns the number of bytes of text that were measured.

Remarks

The buffer parameter is a pointer to a region in memory that contains text encoded in the TextEncoding format. This only consumes up to length bytes from the buffer.

Applies to

BreakText(IntPtr, IntPtr, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

public long BreakText (IntPtr buffer, IntPtr length, float maxWidth);

Parameters

buffer
IntPtr

The pointer to a region holding text encoded using the encoding specified in TextEncoding format.

length
IntPtr

The number of bytes to read from the buffer.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

Returns

Int64

Returns the number of bytes of text that were measured.

Remarks

The buffer parameter is a pointer to a region in memory that contains text encoded in the TextEncoding format. This only consumes up to length bytes from the buffer.

Applies to

BreakText(ReadOnlySpan<Byte>, Single, Single)

public long BreakText (ReadOnlySpan<byte> text, float maxWidth, out float measuredWidth);

Parameters

maxWidth
Single
measuredWidth
Single

Returns

Int64

Applies to

BreakText(ReadOnlySpan<Char>, Single, Single)

public long BreakText (ReadOnlySpan<char> text, float maxWidth, out float measuredWidth);

Parameters

maxWidth
Single
measuredWidth
Single

Returns

Int64

Applies to

BreakText(String, Single, Single)

Measure the text, stopping early if the measured width exceeds maxWidth.

public long BreakText (string text, float maxWidth, out float measuredWidth);

Parameters

text
String

The text to be measured.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

measuredWidth
Single

The actual width of the measured text.

Returns

Int64

Returns the number of characters of text that were measured.

Applies to

BreakText(IntPtr, Int32, Single, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

public long BreakText (IntPtr buffer, int length, float maxWidth, out float measuredWidth);

Parameters

buffer
IntPtr

The pointer to a region holding text encoded using the encoding specified in TextEncoding format.

length
Int32

The number of bytes to read from the buffer.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

measuredWidth
Single

The actual width of the measured text.

Returns

Int64

Returns the number of bytes of text that were measured.

Remarks

The buffer parameter is a pointer to a region in memory that contains text encoded in the TextEncoding format. This only consumes up to length bytes from the buffer.

Applies to

BreakText(IntPtr, IntPtr, Single, Single)

Measure the text buffer, stopping early if the measured width exceeds maxWidth.

public long BreakText (IntPtr buffer, IntPtr length, float maxWidth, out float measuredWidth);

Parameters

buffer
IntPtr

The pointer to a region holding text encoded using the encoding specified in TextEncoding format.

length
IntPtr

The number of bytes to read from the buffer.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

measuredWidth
Single

The actual width of the measured text.

Returns

Int64

Returns the number of bytes of text that were measured.

Remarks

The buffer parameter is a pointer to a region in memory that contains text encoded in the TextEncoding format. This only consumes up to length bytes from the buffer.

Applies to

BreakText(String, Single, Single, String)

Measure the text, stopping early if the measured width exceeds maxWidth.

public long BreakText (string text, float maxWidth, out float measuredWidth, out string measuredText);

Parameters

text
String

The text to be measured.

maxWidth
Single

The maximum width. Only the subset of text whose accumulated widths are <= maxWidth are measured.

measuredWidth
Single

The actual width of the measured text.

measuredText
String

The text that was measured.

Returns

Int64

Returns the number of characters of text that were measured.

Applies to