[]
        
(Showing Draft Content)

C1.Win.Drawing.StringRendererGDI.MeasureSubstring

MeasureSubstring Method

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

Gets the bounds for displaying the part of this text.

Declaration
public static Rectangle[] MeasureSubstring(Graphics graphics, Font font, TextFormatFlags textFormatFlags, Rectangle bounds, string text, string substring, int substringStartIndex)
Public Shared Function MeasureSubstring(graphics As Graphics, font As Font, textFormatFlags As TextFormatFlags, bounds As Rectangle, text As String, substring As String, substringStartIndex As Integer) As Rectangle()
Parameters
Type Name Description
Graphics graphics

The device context.

Font font

The Font of text.

TextFormatFlags textFormatFlags

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, TextFormatFlags, Rectangle, string, int, int)

Gets the bounds for displaying the part of this text.

Declaration
public static Rectangle[] MeasureSubstring(Graphics graphics, Font font, TextFormatFlags textFormatFlags, Rectangle bounds, string text, int substringStartIndex, int substringLength)
Public Shared Function MeasureSubstring(graphics As Graphics, font As Font, textFormatFlags As TextFormatFlags, bounds As Rectangle, text As String, substringStartIndex As Integer, substringLength As Integer) As Rectangle()
Parameters
Type Name Description
Graphics graphics

The device context.

Font font

The Font of text.

TextFormatFlags textFormatFlags

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, TextFormatFlags, Rectangle, string, IList<CharacterRange>)

Gets the bounds for displaying the part of this text.

Declaration
public static Rectangle[] MeasureSubstring(Graphics graphics, Font font, TextFormatFlags textFormatFlags, Rectangle bounds, string text, IList<CharacterRange> substringRanges)
Public Shared Function MeasureSubstring(graphics As Graphics, font As Font, textFormatFlags As TextFormatFlags, bounds As Rectangle, text As String, substringRanges As IList(Of CharacterRange)) As Rectangle()
Parameters
Type Name Description
Graphics graphics

The device context.

Font font

The Font of text.

TextFormatFlags textFormatFlags

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[]