# C1.Util.DX.Direct2D.RenderTarget.CreateCompatibleRenderTarget

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_RenderTarget_CreateCompatibleRenderTarget_" data-uid="C1.Util.DX.Direct2D.RenderTarget.CreateCompatibleRenderTarget*">CreateCompatibleRenderTarget Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_RenderTarget_CreateCompatibleRenderTarget_" data-uid="C1.Util.DX.Direct2D.RenderTarget.CreateCompatibleRenderTarget*"></a>
<h4 id="C1_Util_DX_Direct2D_RenderTarget_CreateCompatibleRenderTarget_System_Nullable_C1_Util_DX_Size2F__System_Nullable_C1_Util_DX_Size2L__System_Nullable_C1_Util_DX_Direct2D_PixelFormat__C1_Util_DX_Direct2D_CompatibleRenderTargetOptions_" data-uid="C1.Util.DX.Direct2D.RenderTarget.CreateCompatibleRenderTarget(System.Nullable{C1.Util.DX.Size2F},System.Nullable{C1.Util.DX.Size2L},System.Nullable{C1.Util.DX.Direct2D.PixelFormat},C1.Util.DX.Direct2D.CompatibleRenderTargetOptions)">CreateCompatibleRenderTarget(Size2F?, Size2L?, PixelFormat?, CompatibleRenderTargetOptions)</h4>
<div class="markdown level1 summary"><p>HRESULT ID2D1RenderTarget::CreateCompatibleRenderTarget([In, Optional] const D2D_SIZE_F* desiredSize,[In, Optional] const D2D_SIZE_U* desiredPixelSize,[In, Optional] const D2D1_PIXEL_FORMAT* desiredFormat,[In] D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS options,[Out, Fast] ID2D1BitmapRenderTarget** bitmapRenderTarget)</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public BitmapRenderTarget CreateCompatibleRenderTarget(Size2F? desiredSize, Size2L? desiredPixelSize, PixelFormat? desiredFormat, CompatibleRenderTargetOptions options)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function CreateCompatibleRenderTarget(desiredSize As Size2F?, desiredPixelSize As Size2L?, desiredFormat As PixelFormat?, options As CompatibleRenderTargetOptions) As BitmapRenderTarget</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.Util.DX.Size2F.html">Size2F</a>?</td>
      <td><span class="parametername">desiredSize</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Size2L.html">Size2L</a>?</td>
      <td><span class="parametername">desiredPixelSize</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.PixelFormat.html">PixelFormat</a>?</td>
      <td><span class="parametername">desiredFormat</span></td>
      <td></td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.CompatibleRenderTargetOptions.html">CompatibleRenderTargetOptions</a></td>
      <td><span class="parametername">options</span></td>
      <td></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="C1.Util.DX.Direct2D.BitmapRenderTarget.html">BitmapRenderTarget</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
