[]
Determines the size of the text.
public static SizeF Measure(Graphics g, string s, Font font, Color foreColor, RectangleF rectangle, HorizontalAlignment halign, VerticalAlignment valign, TextOrientation textOrientation, bool wordWrap, bool multiline, HotkeyPrefix hotkeyPrefix, StringTrimming stringTrim, int drawRectHeight, bool adjust, double rotationAngle, int textIndent)
Public Shared Function Measure(g As Graphics, s As String, font As Font, foreColor As Color, rectangle As RectangleF, halign As HorizontalAlignment, valign As VerticalAlignment, textOrientation As TextOrientation, wordWrap As Boolean, multiline As Boolean, hotkeyPrefix As HotkeyPrefix, stringTrim As StringTrimming, drawRectHeight As Integer, adjust As Boolean, rotationAngle As Double, textIndent As Integer) As SizeF
Type | Name | Description |
---|---|---|
Graphics | g | Graphics device interface for measuring the text on |
string | s | Text to measure |
Font | font | Font of the text |
Color | foreColor | Color of the text |
RectangleF | rectangle | Bounding rectangle of the text |
HorizontalAlignment | halign | Horizontal alignment settings of the text relative to its bounding rectangle |
VerticalAlignment | valign | Vertical alignment settings of the text relative to its bounding rectangle |
TextOrientation | textOrientation | Orientation of the text |
bool | wordWrap | Whether the text is wrapped to multiple lines |
bool | multiline | Whether multiple lines are allowed |
HotkeyPrefix | hotkeyPrefix | Hotkey prefix |
StringTrimming | stringTrim | Trimming effect of the text |
int | drawRectHeight | Height of the rectangle |
bool | adjust | Whether to adjust the bounding rectangle of the text |
double | rotationAngle | Rotation angle of the text |
int | textIndent | Number of pixels to indent the text |
Type | Description |
---|---|
SizeF |
Determines the size of the text.
public static SizeF Measure(DrawTextArgs args)
Public Shared Function Measure(args As DrawTextArgs) As SizeF
Type | Name | Description |
---|---|---|
DrawTextArgs | args | Draw Text arguments |
Type | Description |
---|---|
SizeF |