DrawRotatedText(Graphics,String,Font,Color,RectangleF,HorizontalAlignment,VerticalAlignment,TextOrientation,Boolean,Boolean,HotkeyPrefix,StringTrimming,Int32,Boolean,Double,Boolean) Method
In This Topic
Draws the specified string in the specified rectangle, with the specified font, color, alignment, orientation, wrapping, hotkey prefix, string trimming, and rotation angle.
Syntax
'Declaration
Public Overloads Shared Sub DrawRotatedText( _
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 Boolean _
)
'Usage
Dim g As Graphics
Dim s As String
Dim font As Font
Dim foreColor As Color
Dim rectText 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 rightToLeft As Boolean
ElementWindowless.DrawRotatedText(g, s, font, foreColor, rectText, halign, valign, textOrientation, wordWrap, multiline, hotkeyPrefix, stringTrim, drawRectHeight, adjust, rotationAngle, rightToLeft)
public static void DrawRotatedText(
Graphics ,
string ,
Font ,
Color ,
RectangleF ,
HorizontalAlignment ,
VerticalAlignment ,
TextOrientation ,
bool ,
bool ,
HotkeyPrefix ,
StringTrimming ,
int ,
bool ,
double ,
bool
)
Parameters
- g
- GDI+ graphics surface
- s
- String to draw
- font
- Font to use
- foreColor
- Color of text
- rectText
- Rectangle in which to draw string
- halign
- Horizontal alignment
- valign
- Vertical alignment
- textOrientation
- Text orientation
- wordWrap
- True to wrap text, false otherwise
- multiline
- True to draw text multiline, false otherwise
- hotkeyPrefix
- HotkeyPrefix
- stringTrim
- StringTrimming
- drawRectHeight
- Height of the target rectangle in pixels
- adjust
- Whether to adjust the rectangle for alignment
- rotationAngle
- Angle to rotate text
- rightToLeft
- True for right to left rendering
See Also