SKPaint.BreakText Method

Definition

Overloads

BreakText(Byte[], Single)

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

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(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

Returns the number of bytes of text that were measured.

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

Returns the number of characters of text that were measured.

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

Returns the number of bytes of text that were measured.

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

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.

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

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.

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

Returns the number of characters of text that were measured.

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

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.

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

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.

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

Returns the number of characters of text that were measured.

Applies to