# C1.Win.Document.Util.C1RichText.DrawOrMeasure

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Document_Util_C1RichText_DrawOrMeasure_" data-uid="C1.Win.Document.Util.C1RichText.DrawOrMeasure*">DrawOrMeasure Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Document_Util_C1RichText_DrawOrMeasure_" data-uid="C1.Win.Document.Util.C1RichText.DrawOrMeasure*"></a>
<h4 id="C1_Win_Document_Util_C1RichText_DrawOrMeasure_System_Drawing_Graphics_System_Drawing_Graphics_C1_Interop_Rect_System_Int32_System_Int32_System_Boolean_" data-uid="C1.Win.Document.Util.C1RichText.DrawOrMeasure(System.Drawing.Graphics,System.Drawing.Graphics,C1.Interop.Rect,System.Int32,System.Int32,System.Boolean)">DrawOrMeasure(Graphics, Graphics, Rect, int, int, bool)</h4>
<div class="markdown level1 summary"><p>Draws or measures the RTF text.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public C1RichText.MeasureInfo DrawOrMeasure(Graphics drawGraphics, Graphics measureGraphics, Rect boundsRectTw, int startIndex, int length, bool measureOnly)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function DrawOrMeasure(drawGraphics As Graphics, measureGraphics As Graphics, boundsRectTw As Rect, startIndex As Integer, length As Integer, measureOnly As Boolean) As C1RichText.MeasureInfo</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><span class="xref">Graphics</span></td>
      <td><span class="parametername">drawGraphics</span></td>
      <td><p>Graphics object on which text will be drawn. Can be null if only measuring should be performing.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Graphics</span></td>
      <td><span class="parametername">measureGraphics</span></td>
      <td><p>Graphics object, which will be used for measuring of RTF text.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rect</span></td>
      <td><span class="parametername">boundsRectTw</span></td>
      <td><p>Bounds of text in twips. If width or height specified as double.PositiveInfinite then it means that this dimension infinite.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">startIndex</span></td>
      <td><p>Index of first char of text's range.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">length</span></td>
      <td><p>Length of text range, if this parameter is 0 or less than zero then all text from startIndex will be calculated.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">measureOnly</span></td>
      <td><p>Indicates whether text should be only measured or not.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="C1.Win.Document.Util.C1RichText.html">C1RichText</a>.<a class="xref" href="C1.Win.Document.Util.C1RichText.MeasureInfo.html">MeasureInfo</a></td>
      <td><p>Returns the C1RichTextMeasureInfo which contains the measured info.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
