Spread Windows Forms 17
FarPoint.Win Assembly / FarPoint.Win.Text Namespace / TextHelper Class / Draw Method / Draw(Graphics,String,Font,Color,RectangleF,HorizontalAlignment,VerticalAlignment,TextOrientation,Boolean,Boolean,HotkeyPrefix,StringTrimming,Int32,Boolean,Double,Int32,Boolean) Method
Graphics device interface for painting the text
Text to draw
Font of the text
Color of the text
Bounding rectangle of the text
Horizontal alignment settings of the text relative to its bounding rectangle
Vertical alignment settings of the text relative to its bounding rectangle
Orientation of the text
Whether the text is wrapped to multiple lines
Whether to allow text to go to multiple lines
Hotkey prefix style of the text
Trimming effect of the text
Height of the drawing rectangle
Whether to adjust the bounding rectangle of the text when drawing
Rotation angle of the text
Number of pixels to indent the text
Whether layout is right-to-left


In This Topic
    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 g As Graphics, _
       ByVal s As String, _
       ByVal font As Font, _
       ByVal foreColor As Color, _
       ByVal rectangle As RectangleF, _
       ByVal halign As HorizontalAlignment, _
       ByVal valign As VerticalAlignment, _
       ByVal textOrientation As TextOrientation, _
       ByVal wordWrap As Boolean, _
       ByVal multiline As Boolean, _
       ByVal hotkeyPrefix As HotkeyPrefix, _
       ByVal stringTrim As StringTrimming, _
       ByVal drawRectHeight As Integer, _
       ByVal adjust As Boolean, _
       ByVal rotationAngle As Double, _
       ByVal textIndent As Integer, _
       ByVal isRTL 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)

    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