# C1.Util.GraphicsRendering.DrawString

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_GraphicsRendering_DrawString_" data-uid="C1.Util.GraphicsRendering.DrawString*">DrawString Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_GraphicsRendering_DrawString_" data-uid="C1.Util.GraphicsRendering.DrawString*"></a>
<h4 id="C1_Util_GraphicsRendering_DrawString_System_String_System_Double_System_Double_" data-uid="C1.Util.GraphicsRendering.DrawString(System.String,System.Double,System.Double)">DrawString(string, double, double)</h4>
<div class="markdown level1 summary"><p>Draw string at specified position.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(string s, double x, double y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawString(s As String, x As Double, y As Double)</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.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>String to draw.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>X-coordinate of string.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>Y-coordinate of string.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_GraphicsRendering_DrawString_" data-uid="C1.Util.GraphicsRendering.DrawString*"></a>
<h4 id="C1_Util_GraphicsRendering_DrawString_System_String_System_Double_System_Double_System_Double_System_Double_System_Byte_System_Byte_" data-uid="C1.Util.GraphicsRendering.DrawString(System.String,System.Double,System.Double,System.Double,System.Double,System.Byte,System.Byte)">DrawString(string, double, double, double, double, byte, byte)</h4>
<div class="markdown level1 summary"><p>Draw string at specified area.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(string s, double x, double y, double w, double h, byte horizontal = 0, byte vertical = 0)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawString(s As String, x As Double, y As Double, w As Double, h As Double, Optional horizontal As Byte = 0, Optional vertical As Byte = 0)</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.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>String to draw.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">x</span></td>
      <td><p>X-coordinate of string.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>Y-coordinate of string.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">w</span></td>
      <td><p>Rendering width.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">h</span></td>
      <td><p>Rendering height.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a></td>
      <td><span class="parametername">horizontal</span></td>
      <td><p>Horizontal alignment (see alignment type).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.byte">byte</a></td>
      <td><span class="parametername">vertical</span></td>
      <td><p>Vertical alignment (see alignment type).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_Util_GraphicsRendering_DrawString_System_String_System_Double_System_Double_System_Double_System_Double_System_Byte_System_Byte__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>The alignment types:
00 - near, left or top alignment (by default)
01 - center or middle alignment
02 - far, right or bottom alignment
03 - justify or stretch alignment</p>
</div>


<a id="C1_Util_GraphicsRendering_DrawString_" data-uid="C1.Util.GraphicsRendering.DrawString*"></a>
<h4 id="C1_Util_GraphicsRendering_DrawString_System_String_System_Drawing_RectangleF_C1_Util_TextAlignType_C1_Util_TextAlignType_" data-uid="C1.Util.GraphicsRendering.DrawString(System.String,System.Drawing.RectangleF,C1.Util.TextAlignType,C1.Util.TextAlignType)">DrawString(string, RectangleF, TextAlignType, TextAlignType)</h4>
<div class="markdown level1 summary"><p>Draw string at specified area with word wrap.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawString(string s, RectangleF rc, TextAlignType horizontal = TextAlignType.Far, TextAlignType vertical = TextAlignType.Far)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawString(s As String, rc As RectangleF, Optional horizontal As TextAlignType = TextAlignType.Far, Optional vertical As TextAlignType = TextAlignType.Far)</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.string">string</a></td>
      <td><span class="parametername">s</span></td>
      <td><p>String to draw.</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">rc</span></td>
      <td><p>Rectangle for text drawing in pixels.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.TextAlignType.html">TextAlignType</a></td>
      <td><span class="parametername">horizontal</span></td>
      <td><p>Horizontal text alignment.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.TextAlignType.html">TextAlignType</a></td>
      <td><span class="parametername">vertical</span></td>
      <td><p>Vertical text alignment.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
