# FarPoint.Win.Text.TextHelper.Draw

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Text_TextHelper_Draw_" data-uid="FarPoint.Win.Text.TextHelper.Draw*">Draw Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Text_TextHelper_Draw_" data-uid="FarPoint.Win.Text.TextHelper.Draw*"></a>
<h4 id="FarPoint_Win_Text_TextHelper_Draw_System_Drawing_Graphics_System_String_System_Drawing_Font_System_Drawing_Color_System_Drawing_RectangleF_FarPoint_Win_HorizontalAlignment_FarPoint_Win_VerticalAlignment_FarPoint_Win_TextOrientation_System_Boolean_System_Boolean_System_Drawing_Text_HotkeyPrefix_System_Drawing_StringTrimming_System_Int32_System_Boolean_System_Double_System_Int32_System_Boolean_" data-uid="FarPoint.Win.Text.TextHelper.Draw(System.Drawing.Graphics,System.String,System.Drawing.Font,System.Drawing.Color,System.Drawing.RectangleF,FarPoint.Win.HorizontalAlignment,FarPoint.Win.VerticalAlignment,FarPoint.Win.TextOrientation,System.Boolean,System.Boolean,System.Drawing.Text.HotkeyPrefix,System.Drawing.StringTrimming,System.Int32,System.Boolean,System.Double,System.Int32,System.Boolean)">Draw(Graphics, string, Font, Color, RectangleF, HorizontalAlignment, VerticalAlignment, TextOrientation, bool, bool, HotkeyPrefix, StringTrimming, int, bool, double, int, bool)</h4>
<div class="markdown level1 summary"><p>Draws the text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void Draw(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, bool isRTL)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub Draw(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, isRTL As Boolean)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.graphics">Graphics</a></td>
      <td><span class="parametername">g</span></td>
      <td><p>Graphics device interface for painting the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>Text to draw</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a></td>
      <td><span class="parametername">font</span></td>
      <td><p>Font of the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">foreColor</span></td>
      <td><p>Color of the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">rectangle</span></td>
      <td><p>Bounding rectangle of the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.HorizontalAlignment.html">HorizontalAlignment</a></td>
      <td><span class="parametername">halign</span></td>
      <td><p>Horizontal alignment settings of the text relative to its bounding rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.VerticalAlignment.html">VerticalAlignment</a></td>
      <td><span class="parametername">valign</span></td>
      <td><p>Vertical alignment settings of the text relative to its bounding rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="FarPoint.Win.TextOrientation.html">TextOrientation</a></td>
      <td><span class="parametername">textOrientation</span></td>
      <td><p>Orientation of the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">wordWrap</span></td>
      <td><p>Whether the text is wrapped to multiple lines</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">multiline</span></td>
      <td><p>Whether to allow text to go to multiple lines</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.text.hotkeyprefix">HotkeyPrefix</a></td>
      <td><span class="parametername">hotkeyPrefix</span></td>
      <td><p>Hotkey prefix style of the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.stringtrimming">StringTrimming</a></td>
      <td><span class="parametername">stringTrim</span></td>
      <td><p>Trimming effect of the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">drawRectHeight</span></td>
      <td><p>Height of the drawing rectangle</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">adjust</span></td>
      <td><p>Whether to adjust the bounding rectangle of the text when drawing</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">rotationAngle</span></td>
      <td><p>Rotation angle of the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">textIndent</span></td>
      <td><p>Number of pixels to indent the text</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isRTL</span></td>
      <td><p>Whether layout is right-to-left</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Text_TextHelper_Draw_" data-uid="FarPoint.Win.Text.TextHelper.Draw*"></a>
<h4 id="FarPoint_Win_Text_TextHelper_Draw_FarPoint_Win_Text_DrawTextArgs_" data-uid="FarPoint.Win.Text.TextHelper.Draw(FarPoint.Win.Text.DrawTextArgs)">Draw(DrawTextArgs)</h4>
<div class="markdown level1 summary"><p>Draws the text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static void Draw(DrawTextArgs args)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Sub Draw(args As DrawTextArgs)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="FarPoint.Win.Text.DrawTextArgs.html">DrawTextArgs</a></td>
      <td><span class="parametername">args</span></td>
      <td><p>Draw Text arguments.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
