# GrapeCity.Documents.Svg.GcSvgDocument.Measure

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Svg_GcSvgDocument_Measure_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.Measure*">Measure Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Svg_GcSvgDocument_Measure_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.Measure*"></a>
<h4 id="GrapeCity_Documents_Svg_GcSvgDocument_Measure_System_Drawing_PointF_System_Single_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.Measure(System.Drawing.PointF,System.Single)">Measure(PointF, float)</h4>
<div class="markdown level1 summary"><p>Calculates the content bounds of an SVG document when its viewport is drawn at a specified point.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RectangleF Measure(PointF viewportPosition, float graphicsResolution = 96)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Measure(viewportPosition As PointF, Optional graphicsResolution As Single = 96) As RectangleF</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.pointf">PointF</a></td>
      <td><span class="parametername">viewportPosition</span></td>
      <td><p>The coordinates for the top-left corner of the SVG viewport.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">graphicsResolution</span></td>
      <td><p>The graphics resolution (pixels per inch).</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="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><p>The content bounds of the resulting image.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Svg_GcSvgDocument_Measure_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.Measure*"></a>
<h4 id="GrapeCity_Documents_Svg_GcSvgDocument_Measure_System_Drawing_RectangleF_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.Measure(System.Drawing.RectangleF)">Measure(RectangleF)</h4>
<div class="markdown level1 summary"><p>Calculates the content bounds of an SVG document, resizing the SVG viewport to fit into a specified rectangle.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RectangleF Measure(RectangleF viewportRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function Measure(viewportRect As RectangleF) As RectangleF</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.rectanglef">RectangleF</a></td>
      <td><span class="parametername">viewportRect</span></td>
      <td><p>The target rectangle for the SVG viewport.</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="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><p>The content bounds of the resulting image.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
