[]
        
(Showing Draft Content)

C1.Win.Drawing.StringRendererGDIPlus.MeasureSubstring

MeasureSubstring Method

MeasureSubstring(Graphics, Font, StringFormat, Rectangle, string, string, int)

Gets the bounds for displaying the part of this text.

Declaration
public static Rectangle[] MeasureSubstring(Graphics graphics, Font font, StringFormat stringFormat, Rectangle bounds, string text, string substring, int substringStartIndex)
Parameters
Type Name Description
Graphics graphics

The device context.

Font font

The Font of text.

StringFormat stringFormat

The text layout information.

Rectangle bounds

The Rectangle that represents the bounds of the text.

string text

The text to draw.

string substring

The substring to highlight.

int substringStartIndex

The position at which the substring starts.

Returns
Type Description
Rectangle[]

MeasureSubstring(Graphics, Font, StringFormat, Rectangle, string, int, int)

Gets the bounds for displaying the part of this text.

Declaration
public static Rectangle[] MeasureSubstring(Graphics graphics, Font font, StringFormat stringFormat, Rectangle bounds, string text, int substringStartIndex, int substringLength)
Parameters
Type Name Description
Graphics graphics

The device context.

Font font

The Font of text.

StringFormat stringFormat

The text layout information.

Rectangle bounds

The Rectangle that represents the bounds of the text.

string text

The text to draw.

int substringStartIndex

The position at which the substring starts.

int substringLength

The length of substring.

Returns
Type Description
Rectangle[]

MeasureSubstring(Graphics, Font, StringFormat, Rectangle, string, IList<CharacterRange>)

Gets the bounds for displaying the part of this text.

Declaration
public static Rectangle[] MeasureSubstring(Graphics graphics, Font font, StringFormat stringFormat, Rectangle bounds, string text, IList<CharacterRange> substringRanges)
Parameters
Type Name Description
Graphics graphics

The device context.

Font font

The Font of text.

StringFormat stringFormat

The text layout information.

Rectangle bounds

The Rectangle that represents the bounds of the text.

string text

The text to draw.

IList<CharacterRange> substringRanges

Positions and lengths of all occurrences of substrings to highlight.

Returns
Type Description
Rectangle[]