Draw(Graphics,String,Font,Color,RectangleF,HorizontalAlignment,VerticalAlignment,TextOrientation,Boolean,Boolean,HotkeyPrefix,StringTrimming,Int32,Boolean,Double,Int32,Boolean) Method
In This Topic
Draws the text.
Syntax
'Declaration
Public Overloads Shared Sub Draw( _
ByVal As Graphics, _
ByVal As String, _
ByVal As Font, _
ByVal As Color, _
ByVal As RectangleF, _
ByVal As HorizontalAlignment, _
ByVal As VerticalAlignment, _
ByVal As TextOrientation, _
ByVal As Boolean, _
ByVal As Boolean, _
ByVal As HotkeyPrefix, _
ByVal As StringTrimming, _
ByVal As Integer, _
ByVal As Boolean, _
ByVal As Double, _
ByVal As Integer, _
ByVal As Boolean _
)
'Usage
Dim g As Graphics
Dim s As String
Dim font As Font
Dim foreColor As Color
Dim rectangle As RectangleF
Dim halign As HorizontalAlignment
Dim valign As VerticalAlignment
Dim textOrientation As TextOrientation
Dim wordWrap As Boolean
Dim multiline As Boolean
Dim hotkeyPrefix As HotkeyPrefix
Dim stringTrim As StringTrimming
Dim drawRectHeight As Integer
Dim adjust As Boolean
Dim rotationAngle As Double
Dim textIndent As Integer
Dim isRTL As Boolean
TextHelper.Draw(g, s, font, foreColor, rectangle, halign, valign, textOrientation, wordWrap, multiline, hotkeyPrefix, stringTrim, drawRectHeight, adjust, rotationAngle, textIndent, isRTL)
public static void Draw(
Graphics ,
string ,
Font ,
Color ,
RectangleF ,
HorizontalAlignment ,
VerticalAlignment ,
TextOrientation ,
bool ,
bool ,
HotkeyPrefix ,
StringTrimming ,
int ,
bool ,
double ,
int ,
bool
)
Parameters
- g
- Graphics device interface for painting the text
- s
- Text to draw
- font
- Font of the text
- foreColor
- Color of the text
- rectangle
- Bounding rectangle of the text
- halign
- Horizontal alignment settings of the text relative to its bounding rectangle
- valign
- Vertical alignment settings of the text relative to its bounding rectangle
- textOrientation
- Orientation of the text
- wordWrap
- Whether the text is wrapped to multiple lines
- multiline
- Whether to allow text to go to multiple lines
- hotkeyPrefix
- Hotkey prefix style of the text
- stringTrim
- Trimming effect of the text
- drawRectHeight
- Height of the drawing rectangle
- adjust
- Whether to adjust the bounding rectangle of the text when drawing
- rotationAngle
- Rotation angle of the text
- textIndent
- Number of pixels to indent the text
- isRTL
- Whether layout is right-to-left
See Also