# GrapeCity.Documents.Imaging.GrayscaleBitmap.ToShadowBitmap

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ToShadowBitmap_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ToShadowBitmap*">ToShadowBitmap Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ToShadowBitmap_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ToShadowBitmap*"></a>
<h4 id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ToShadowBitmap_System_Drawing_Color_System_Single_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ToShadowBitmap(System.Drawing.Color,System.Single,System.Boolean)">ToShadowBitmap(Color, float, bool)</h4>
<div class="markdown level1 summary"><p>Creates a semi-transparent <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> from the current <a class="xref" href="GrapeCity.Documents.Imaging.GrayscaleBitmap.html">GrayscaleBitmap</a>.</p>
<p>
This method treats the current <a class="xref" href="GrapeCity.Documents.Imaging.GrayscaleBitmap.html">GrayscaleBitmap</a> as a transparency mask, regardless of the <a class="xref" href="GrapeCity.Documents.Imaging.GrayscaleBitmap.TransparencyMask.html#GrapeCity_Documents_Imaging_GrayscaleBitmap_TransparencyMask">TransparencyMask</a> property value.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public GcBitmap ToShadowBitmap(Color shadowColor, float opacityFactor = 1, bool zeroIsOpaque = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function ToShadowBitmap(shadowColor As Color, Optional opacityFactor As Single = 1, Optional zeroIsOpaque As Boolean = False) As GcBitmap</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.color">Color</a></td>
      <td><span class="parametername">shadowColor</span></td>
      <td><p>The color to fill opaque pixels of the target bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">opacityFactor</span></td>
      <td><p>Additional factor to scale the alpha channel.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">zeroIsOpaque</span></td>
      <td><p>Specifies whether zero values correspond to fully opaque (<a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>)
or fully transparent (<a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>) pixels.</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><a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a></td>
      <td><p>The newly created <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a>.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ToShadowBitmap_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ToShadowBitmap*"></a>
<h4 id="GrapeCity_Documents_Imaging_GrayscaleBitmap_ToShadowBitmap_GrapeCity_Documents_Imaging_GcBitmap_System_Drawing_Color_System_Single_System_Boolean_" data-uid="GrapeCity.Documents.Imaging.GrayscaleBitmap.ToShadowBitmap(GrapeCity.Documents.Imaging.GcBitmap,System.Drawing.Color,System.Single,System.Boolean)">ToShadowBitmap(GcBitmap, Color, float, bool)</h4>
<div class="markdown level1 summary"><p>Converts an existing instance of <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> to a semi-transparent bitmap
representing the current <a class="xref" href="GrapeCity.Documents.Imaging.GrayscaleBitmap.html">GrayscaleBitmap</a>.</p>
<p>
This method treats the current <a class="xref" href="GrapeCity.Documents.Imaging.GrayscaleBitmap.html">GrayscaleBitmap</a> as a transparency mask, regardless of the <a class="xref" href="GrapeCity.Documents.Imaging.GrayscaleBitmap.TransparencyMask.html#GrapeCity_Documents_Imaging_GrayscaleBitmap_TransparencyMask">TransparencyMask</a> property value.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ToShadowBitmap(GcBitmap bmp, Color shadowColor, float opacityFactor = 1, bool zeroIsOpaque = false)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ToShadowBitmap(bmp As GcBitmap, shadowColor As Color, Optional opacityFactor As Single = 1, Optional zeroIsOpaque As Boolean = False)</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.Imaging.GcBitmap.html">GcBitmap</a></td>
      <td><span class="parametername">bmp</span></td>
      <td><p>The target <a class="xref" href="GrapeCity.Documents.Imaging.GcBitmap.html">GcBitmap</a> object.</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">shadowColor</span></td>
      <td><p>The color to fill opaque pixels of the target bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">opacityFactor</span></td>
      <td><p>Additional factor to scale the alpha channel.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">zeroIsOpaque</span></td>
      <td><p>Specifies whether zero values correspond to fully opaque (<a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>)
or fully transparent (<a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>) pixels.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
