# FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiBrush

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiBrush_" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiBrush*">ToGdiBrush Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiBrush_" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiBrush*"></a>
<h4 id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiBrush_GrapeCity_Spreadsheet_Fill_System_Drawing_Rectangle_System_Boolean__" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiBrush(GrapeCity.Spreadsheet.Fill,System.Drawing.Rectangle,System.Boolean@)">ToGdiBrush(Fill, Rectangle, out bool)</h4>
<div class="markdown level1 summary"><p>Gets the corresponding GDI+ brush.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">Brush ToGdiBrush(Fill fill, Rectangle rect, out bool disposable)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function ToGdiBrush(fill As Fill, rect As Rectangle, ByRef disposable As Boolean) As Brush</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.Spreadsheet/GrapeCity.Spreadsheet.Fill.html">Fill</a></td>
      <td><span class="parametername">fill</span></td>
      <td><p>The brush data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">rect</span></td>
      <td><p>The painting rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">disposable</span></td>
      <td><p><code>true</code> if the brush can be disposable; otherwise, <code>false</code>.</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><span class="xref">Brush</span></td>
      <td><p>A <span class="xref">System.Drawing.Brush</span> object represents the corresponding GDI+ brush.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiBrush_" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiBrush*"></a>
<h4 id="FarPoint_Win_Spread_CellType_IPaintingContext_ToGdiBrush_GrapeCity_Drawing_Brush_System_Drawing_Rectangle_System_Drawing_Drawing2D_GraphicsPath_" data-uid="FarPoint.Win.Spread.CellType.IPaintingContext.ToGdiBrush(GrapeCity.Drawing.Brush,System.Drawing.Rectangle,System.Drawing.Drawing2D.GraphicsPath)">ToGdiBrush(Brush, Rectangle, GraphicsPath)</h4>
<div class="markdown level1 summary"><p>Gets the corresponding GDI+ brush.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">Brush ToGdiBrush(Brush brush, Rectangle rect, GraphicsPath graphicsPath = null)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Function ToGdiBrush(brush As Brush, rect As Rectangle, Optional graphicsPath As GraphicsPath = Nothing) As Brush</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><span class="xref">Brush</span></td>
      <td><span class="parametername">brush</span></td>
      <td><p>The brush data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectangle">Rectangle</a></td>
      <td><span class="parametername">rect</span></td>
      <td><p>The painting rectangle.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.drawing2d.graphicspath">GraphicsPath</a></td>
      <td><span class="parametername">graphicsPath</span></td>
      <td><p>The painting graphic path.</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><span class="xref">Brush</span></td>
      <td><p>A <span class="xref">System.Drawing.Brush</span> object represents the corresponding GDI+ brush.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
