# GrapeCity.Documents.Drawing.GcGraphics.DrawSvg

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Drawing_GcGraphics_DrawSvg_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawSvg*">DrawSvg Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Drawing_GcGraphics_DrawSvg_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawSvg*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_DrawSvg_GrapeCity_Documents_Svg_GcSvgDocument_System_Drawing_PointF_System_Single_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawSvg(GrapeCity.Documents.Svg.GcSvgDocument,System.Drawing.PointF,System.Single)">DrawSvg(GcSvgDocument, PointF, float)</h4>
<div class="markdown level1 summary"><p>Draws a specified SVG document at a point specifying the position of the SVG viewport.</p>
<p>To specify the position of the SVG content rather than viewport, see <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.DrawSvgContent.html#GrapeCity_Documents_Drawing_GcGraphics_DrawSvgContent_GrapeCity_Documents_Svg_GcSvgDocument_System_Drawing_PointF_System_Single_">DrawSvgContent(GcSvgDocument, PointF, float)</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawSvg(GcSvgDocument svgDocument, PointF viewportPosition, float opacity = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawSvg(svgDocument As GcSvgDocument, viewportPosition As PointF, Optional opacity As Single = 1)</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="GrapeCity.Documents.Svg.GcSvgDocument.html">GcSvgDocument</a></td>
      <td><span class="parametername">svgDocument</span></td>
      <td><p>The SVG document to draw.</p>
</td>
    </tr>
    <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 drawing 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">opacity</span></td>
      <td><p>The opacity factor to be applied to the SVG content.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_GcGraphics_DrawSvg_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawSvg*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_DrawSvg_GrapeCity_Documents_Svg_GcSvgDocument_System_Drawing_RectangleF_System_Single_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawSvg(GrapeCity.Documents.Svg.GcSvgDocument,System.Drawing.RectangleF,System.Single)">DrawSvg(GcSvgDocument, RectangleF, float)</h4>
<div class="markdown level1 summary"><p>Draws a specified SVG document, resizing its viewport to fit into a specified rectangle.</p>
<p>To draw just the content of the SVG ignoring viewport position, see <a class="xref" href="GrapeCity.Documents.Drawing.GcGraphics.DrawSvgContent.html#GrapeCity_Documents_Drawing_GcGraphics_DrawSvgContent_GrapeCity_Documents_Svg_GcSvgDocument_System_Drawing_RectangleF_System_Single_">DrawSvgContent(GcSvgDocument, RectangleF, float)</a>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawSvg(GcSvgDocument svgDocument, RectangleF viewportRect, float opacity = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawSvg(svgDocument As GcSvgDocument, viewportRect As RectangleF, Optional opacity As Single = 1)</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="GrapeCity.Documents.Svg.GcSvgDocument.html">GcSvgDocument</a></td>
      <td><span class="parametername">svgDocument</span></td>
      <td><p>The SVG document 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">viewportRect</span></td>
      <td><p>The target rectangle for 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">opacity</span></td>
      <td><p>The opacity factor to be applied to the SVG content.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
