Graphics.MeasureCharacterRanges

Graphics.MeasureCharacterRanges method

Gets an array of Region objects, each of which bounds a range of character positions within the specified string.

public Region[] MeasureCharacterRanges(string text, Font font, RectangleF layoutRect, 
    StringFormat stringFormat)
ParameterTypeDescription
textStringString to measure.
fontFontFont that defines the text format of the string.
layoutRectRectangleFRectangleF structure that specifies the layout rectangle for the string.
stringFormatStringFormatStringFormat that represents formatting information, such as line spacing, for the string.

Return Value

This method returns an array of Region objects, each of which bounds a range of character positions within the specified string.

See Also