# GrapeCity.Spreadsheet.Printing.PrintingContext.DrawImage

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Spreadsheet_Printing_PrintingContext_DrawImage_" data-uid="GrapeCity.Spreadsheet.Printing.PrintingContext.DrawImage*">DrawImage Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Spreadsheet_Printing_PrintingContext_DrawImage_" data-uid="GrapeCity.Spreadsheet.Printing.PrintingContext.DrawImage*"></a>
<h4 id="GrapeCity_Spreadsheet_Printing_PrintingContext_DrawImage_System_IO_Stream_GrapeCity_Drawing_Rectangle_GrapeCity_CalcEngine_SizingMode_System_Nullable_GrapeCity_Drawing_Rectangle__GrapeCity_Drawing_RectAlignment_" data-uid="GrapeCity.Spreadsheet.Printing.PrintingContext.DrawImage(System.IO.Stream,GrapeCity.Drawing.Rectangle,GrapeCity.CalcEngine.SizingMode,System.Nullable{GrapeCity.Drawing.Rectangle},GrapeCity.Drawing.RectAlignment)">DrawImage(Stream, Rectangle, SizingMode, Rectangle?, RectAlignment)</h4>
<div class="markdown level1 summary"><p>Draws an image into the region defined by the specified <span class="xref">GrapeCity.Drawing.Rectangle</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public abstract void DrawImage(Stream imageStream, Rectangle bounds, SizingMode sizingMode, Rectangle? clipBounds = null, RectAlignment rectAlignment = RectAlignment.Unspecified)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public MustOverride Sub DrawImage(imageStream As Stream, bounds As Rectangle, sizingMode As SizingMode, Optional clipBounds As Rectangle? = Nothing, Optional rectAlignment As RectAlignment = RectAlignment.Unspecified)</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.io.stream">Stream</a></td>
      <td><span class="parametername">imageStream</span></td>
      <td><p>The data stream of image to draw.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rectangle</span></td>
      <td><span class="parametername">bounds</span></td>
      <td><p><span class="xref">GrapeCity.Drawing.Rectangle</span> structure that specifies the location and size of the drawn image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.CalcEngine.SizingMode.html">SizingMode</a></td>
      <td><span class="parametername">sizingMode</span></td>
      <td><p><a class="xref" href="GrapeCity.CalcEngine.SizingMode.html">SizingMode</a> structure that specifies the the image dimensions.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rectangle</span>?</td>
      <td><span class="parametername">clipBounds</span></td>
      <td><p><span class="xref">GrapeCity.Drawing.Rectangle</span> structure that specifies the clipping rectangle, or null for no clipping.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">RectAlignment</span></td>
      <td><span class="parametername">rectAlignment</span></td>
      <td><p><span class="xref">GrapeCity.Drawing.RectAlignment</span> that specifies how's the image aligned.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Spreadsheet_Printing_PrintingContext_DrawImage_" data-uid="GrapeCity.Spreadsheet.Printing.PrintingContext.DrawImage*"></a>
<h4 id="GrapeCity_Spreadsheet_Printing_PrintingContext_DrawImage_System_String_GrapeCity_Drawing_Rectangle_GrapeCity_CalcEngine_SizingMode_System_Nullable_GrapeCity_Drawing_Rectangle__GrapeCity_Drawing_RectAlignment_" data-uid="GrapeCity.Spreadsheet.Printing.PrintingContext.DrawImage(System.String,GrapeCity.Drawing.Rectangle,GrapeCity.CalcEngine.SizingMode,System.Nullable{GrapeCity.Drawing.Rectangle},GrapeCity.Drawing.RectAlignment)">DrawImage(string, Rectangle, SizingMode, Rectangle?, RectAlignment)</h4>
<div class="markdown level1 summary"><p>Draws an image into the region defined by the specified <span class="xref">GrapeCity.Drawing.Rectangle</span>.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public abstract void DrawImage(string filePath, Rectangle bounds, SizingMode sizingMode, Rectangle? clipBounds = null, RectAlignment rectAlignment = RectAlignment.Unspecified)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public MustOverride Sub DrawImage(filePath As String, bounds As Rectangle, sizingMode As SizingMode, Optional clipBounds As Rectangle? = Nothing, Optional rectAlignment As RectAlignment = RectAlignment.Unspecified)</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">filePath</span></td>
      <td><p>File path of image to draw</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rectangle</span></td>
      <td><span class="parametername">bounds</span></td>
      <td><p><span class="xref">GrapeCity.Drawing.Rectangle</span> structure that specifies the location and size of the drawn image.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.CalcEngine.SizingMode.html">SizingMode</a></td>
      <td><span class="parametername">sizingMode</span></td>
      <td><p><a class="xref" href="GrapeCity.CalcEngine.SizingMode.html">SizingMode</a> structure that specifies the the image dimensions.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">Rectangle</span>?</td>
      <td><span class="parametername">clipBounds</span></td>
      <td><p><span class="xref">GrapeCity.Drawing.Rectangle</span> structure that specifies the clipping rectangle, or null for no clipping.</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">RectAlignment</span></td>
      <td><span class="parametername">rectAlignment</span></td>
      <td><p><span class="xref">GrapeCity.Drawing.RectAlignment</span> that specifies how's the image aligned.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
