# C1.Win.Bitmap.C1Bitmap.ImportAsFragment

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment*">ImportAsFragment Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment*"></a>
<h4 id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_C1_Win_Bitmap_C1Bitmap_System_Int32_System_Int32_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment(C1.Win.Bitmap.C1Bitmap,System.Int32,System.Int32)">ImportAsFragment(C1Bitmap, int, int)</h4>
<div class="markdown level1 summary"><p>Loads another C1Bitmap to the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(C1Bitmap bitmap, int dstX, int dstY)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(bitmap As C1Bitmap, dstX As Integer, dstY As Integer)</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="C1.Win.Bitmap.C1Bitmap.html">C1Bitmap</a></td>
      <td><span class="parametername">bitmap</span></td>
      <td><p>The source bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dstX</span></td>
      <td><p>The destination X pixel coordinate within the target bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dstY</span></td>
      <td><p>The destination Y pixel coordinate within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment*"></a>
<h4 id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_System_Byte___C1_Win_Bitmap_ImageRect_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment(System.Byte[],C1.Win.Bitmap.ImageRect)">ImportAsFragment(byte[], ImageRect)</h4>
<div class="markdown level1 summary"><p>Loads the pixel buffer from a byte array to the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(byte[] bytes, ImageRect dstRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(bytes As Byte(), dstRect As ImageRect)</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.byte">byte</a>[]</td>
      <td><span class="parametername">bytes</span></td>
      <td><p>The source byte array with pixel buffer.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Bitmap.ImageRect.html">ImageRect</a></td>
      <td><span class="parametername">dstRect</span></td>
      <td><p>The destination rectangle within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment*"></a>
<h4 id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_System_IntPtr_C1_Win_Bitmap_ImageRect_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment(System.IntPtr,C1.Win.Bitmap.ImageRect)">ImportAsFragment(IntPtr, ImageRect)</h4>
<div class="markdown level1 summary"><p>Copies the unmanaged block of memory to the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(IntPtr srcPtr, ImageRect dstRect)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(srcPtr As IntPtr, dstRect As ImageRect)</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.intptr">IntPtr</a></td>
      <td><span class="parametername">srcPtr</span></td>
      <td><p>The pointer to the beginning of the unmanaged block of memory.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Win.Bitmap.ImageRect.html">ImageRect</a></td>
      <td><span class="parametername">dstRect</span></td>
      <td><p>The destination rectangle within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment*"></a>
<h4 id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_System_Drawing_Bitmap_System_Int32_System_Int32_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment(System.Drawing.Bitmap,System.Int32,System.Int32)">ImportAsFragment(Bitmap, int, int)</h4>
<div class="markdown level1 summary"><p>Loads a System.Drawing.Bitmap to the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(Bitmap gdiBitmap, int dstX, int dstY)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(gdiBitmap As Bitmap, dstX As Integer, dstY As Integer)</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.bitmap">Bitmap</a></td>
      <td><span class="parametername">gdiBitmap</span></td>
      <td><p>The source System.Drawing.Bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dstX</span></td>
      <td><p>The destination X pixel coordinate within the target bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dstY</span></td>
      <td><p>The destination Y pixel coordinate within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment*"></a>
<h4 id="C1_Win_Bitmap_C1Bitmap_ImportAsFragment_C1_Util_DX_Direct2D_Bitmap1_C1_Util_DX_Direct2D_DeviceContext_C1_Util_DX_RectL_System_Int32_System_Int32_" data-uid="C1.Win.Bitmap.C1Bitmap.ImportAsFragment(C1.Util.DX.Direct2D.Bitmap1,C1.Util.DX.Direct2D.DeviceContext,C1.Util.DX.RectL,System.Int32,System.Int32)">ImportAsFragment(Bitmap1, DeviceContext, RectL, int, int)</h4>
<div class="markdown level1 summary"><p>Loads a fragment of the D2D.Bitmap1 to the given destination within the image.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void ImportAsFragment(Bitmap1 d2dBitmap, DeviceContext context, RectL srcRect, int dstX, int dstY)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub ImportAsFragment(d2dBitmap As Bitmap1, context As DeviceContext, srcRect As RectL, dstX As Integer, dstY As Integer)</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="../C1.Win.DX.4.8/C1.Util.DX.Direct2D.Bitmap1.html">Bitmap1</a></td>
      <td><span class="parametername">d2dBitmap</span></td>
      <td><p>The source D2D.Bitmap1.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../C1.Win.DX.4.8/C1.Util.DX.Direct2D.DeviceContext.html">DeviceContext</a></td>
      <td><span class="parametername">context</span></td>
      <td><p>The device context used to create a D2D bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="../C1.Win.DX.4.8/C1.Util.DX.RectL.html">RectL</a></td>
      <td><span class="parametername">srcRect</span></td>
      <td><p>The source rectangle within d2dBitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dstX</span></td>
      <td><p>The destination X pixel coordinate within the target bitmap.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">dstY</span></td>
      <td><p>The destination Y pixel coordinate within the target bitmap.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
