[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.GcGraphics.MeasureStringWithTrailingWhitespace

MeasureStringWithTrailingWhitespace Method

MeasureStringWithTrailingWhitespace(string, Font, float, float?)

Measures a string using a specified font, font size and layout width, taking into account the trailing whitespace at the end of each line.

Declaration
public SizeF MeasureStringWithTrailingWhitespace(string text, Font font, float fontSize, float? width = null)
Public Function MeasureStringWithTrailingWhitespace(text As String, font As Font, fontSize As Single, Optional width As Single? = Nothing) As SizeF
Parameters
Type Name Description
string text

The string to measure.

Font font

The font to use.

float fontSize

The font size to use.

float? width

The width allocated to draw the string, or null to indicate unlimited width.

Returns
Type Description
SizeF

The size needed to draw the string with trailing whitespace.

MeasureStringWithTrailingWhitespace(string, TextFormat, float?)

Measures a string using a specified TextFormat, taking into account the trailing whitespace at the end of each line.

Declaration
public SizeF MeasureStringWithTrailingWhitespace(string text, TextFormat textFormat, float? width = null)
Public Function MeasureStringWithTrailingWhitespace(text As String, textFormat As TextFormat, Optional width As Single? = Nothing) As SizeF
Parameters
Type Name Description
string text

The string to measure.

TextFormat textFormat

The text format to use.

float? width

The width allocated to draw the string, or null to indicate unlimited width.

Returns
Type Description
SizeF

The size needed to draw the string with trailing whitespace.