# GrapeCity.Documents.Drawing.GcGraphics.FillRectangle

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Drawing_GcGraphics_FillRectangle_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.FillRectangle*">FillRectangle Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Drawing_GcGraphics_FillRectangle_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.FillRectangle*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_FillRectangle_System_Drawing_RectangleF_GrapeCity_Documents_Drawing_Brush_System_Nullable_System_Drawing_RectangleF__System_Nullable_System_Numerics_Matrix3x2__" data-uid="GrapeCity.Documents.Drawing.GcGraphics.FillRectangle(System.Drawing.RectangleF,GrapeCity.Documents.Drawing.Brush,System.Nullable{System.Drawing.RectangleF},System.Nullable{System.Numerics.Matrix3x2})">FillRectangle(RectangleF, Brush, RectangleF?, Matrix3x2?)</h4>
<div class="markdown level1 summary"><p>Fills a rectangle using a specified brush.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void FillRectangle(RectangleF bounds, Brush brush, RectangleF? brushBounds = null, Matrix3x2? brushTransform = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub FillRectangle(bounds As RectangleF, brush As Brush, Optional brushBounds As RectangleF? = Nothing, Optional brushTransform As Matrix3x2? = Nothing)</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">bounds</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a> structure that represents the rectangle to fill.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Documents.Drawing.Brush.html">Brush</a></td>
      <td><span class="parametername">brush</span></td>
      <td><p>The brush to use.</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">brushBounds</span></td>
      <td><p>The optional bounds for a gradient brush.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.numerics.matrix3x2">Matrix3x2</a>?</td>
      <td><span class="parametername">brushTransform</span></td>
      <td><p>The transformation applied to the brush.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Drawing_GcGraphics_FillRectangle_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.FillRectangle*"></a>
<h4 id="GrapeCity_Documents_Drawing_GcGraphics_FillRectangle_System_Drawing_RectangleF_System_Drawing_Color_" data-uid="GrapeCity.Documents.Drawing.GcGraphics.FillRectangle(System.Drawing.RectangleF,System.Drawing.Color)">FillRectangle(RectangleF, Color)</h4>
<div class="markdown level1 summary"><p>Fills a rectangle with a solid color.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void FillRectangle(RectangleF bounds, Color color)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub FillRectangle(bounds As RectangleF, color As Color)</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">bounds</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a> structure that represents the rectangle to fill.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.color">Color</a></td>
      <td><span class="parametername">color</span></td>
      <td><p>The fill color.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
