# GrapeCity.Documents.Drawing.GcGraphics.DrawImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Drawing_GcGraphics_DrawImage_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawImage*">DrawImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Drawing_GcGraphics_DrawImage_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawImage*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_DrawImage_GrapeCity_Documents_Drawing_IImage_System_Drawing_RectangleF_System_Nullable_System_Drawing_RectangleF__GrapeCity_Documents_Drawing_ImageAlign_System_Single_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawImage(GrapeCity.Documents.Drawing.IImage,System.Drawing.RectangleF,System.Nullable{System.Drawing.RectangleF},GrapeCity.Documents.Drawing.ImageAlign,System.Single)">DrawImage(IImage, RectangleF, RectangleF?, ImageAlign, float)</h4>
<div class="markdown level1 summary"><p>Draws an image using specified bounds, clipping and image alignment.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawImage(IImage image, RectangleF destBounds, RectangleF? clipBounds, ImageAlign align, float opacity = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawImage(image As IImage, destBounds As RectangleF, clipBounds As RectangleF?, align As ImageAlign, 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.Drawing.IImage.html">IImage</a></td>
      <td><span class="parametername">image</span></td>
      <td><p>The image 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">destBounds</span></td>
      <td><p>The destination rectangle.</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">clipBounds</span></td>
      <td><p>The clipping rectangle, or null for no clipping.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Drawing.ImageAlign.html">ImageAlign</a></td>
      <td><span class="parametername">align</span></td>
      <td><p>The image alignment.</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 image opacity.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_GcGraphics_DrawImage_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawImage*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_DrawImage_GrapeCity_Documents_Drawing_IImage_System_Drawing_RectangleF_System_Nullable_System_Drawing_RectangleF__GrapeCity_Documents_Drawing_ImageAlign_System_Drawing_RectangleF____System_Single_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.DrawImage(GrapeCity.Documents.Drawing.IImage,System.Drawing.RectangleF,System.Nullable{System.Drawing.RectangleF},GrapeCity.Documents.Drawing.ImageAlign,System.Drawing.RectangleF[]@,System.Single)">DrawImage(IImage, RectangleF, RectangleF?, ImageAlign, out RectangleF[], float)</h4>
<div class="markdown level1 summary"><p>Draws an image using specified bounds, clipping and image alignment.</p>
<p>In an output parameter, returns the array of actual image bounds.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void DrawImage(IImage image, RectangleF destBounds, RectangleF? clipBounds, ImageAlign align, out RectangleF[] imageBounds, float opacity = 1)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub DrawImage(image As IImage, destBounds As RectangleF, clipBounds As RectangleF?, align As ImageAlign, ByRef imageBounds 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.Drawing.IImage.html">IImage</a></td>
      <td><span class="parametername">image</span></td>
      <td><p>The image 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">destBounds</span></td>
      <td><p>The destination rectangle.</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">clipBounds</span></td>
      <td><p>The clipping rectangle, or null for no clipping.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Drawing.ImageAlign.html">ImageAlign</a></td>
      <td><span class="parametername">align</span></td>
      <td><p>The image alignment.</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">imageBounds</span></td>
      <td><p>OUT: The actual bounds of the drawn images (can be more than one if the image is tiled).</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 image opacity.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
