# C1.Util.DX.Direct2D.Layer

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Util_DX_Direct2D_Layer" data-uid="C1.Util.DX.Direct2D.Layer" class="text-break">Layer Class
</h1>
  <div class="markdown level0 summary"><p>ID2D1Layer</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><a class="xref" href="C1.Util.DX.DisposeBase.html">DisposeBase</a></div>
    <div class="level2"><a class="xref" href="C1.Util.DX.CppObject.html">CppObject</a></div>
    <div class="level3"><a class="xref" href="C1.Util.DX.ComObject.html">ComObject</a></div>
    <div class="level4"><a class="xref" href="C1.Util.DX.Direct2D.Resource.html">Resource</a></div>
    <div class="level5"><span class="xref">Layer</span></div>
  </div>
  <div class="implements">
    <h5>Implements</h5>
    <div><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.idisposable">IDisposable</a></div>
    <div><a class="xref" href="C1.Util.DX.IUnknown.html">IUnknown</a></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="C1.Util.DX.Direct2D.html">C1.Util.DX.Direct2D</a></h6>
  <h6><strong>Assembly</strong>: C1.WPF.DX.4.6.2.dll</h6>
  <h5 id="C1_Util_DX_Direct2D_Layer_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[Guid(&quot;2cd9069b-12e2-11dc-9fed-001143a055f9&quot;)]
public class Layer : Resource, IDisposable, IUnknown</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;Guid(&quot;2cd9069b-12e2-11dc-9fed-001143a055f9&quot;)&gt;
Public Class Layer
    Inherits Resource
    Implements IDisposable, IUnknown</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_Direct2D_Layer__ctor_System_IntPtr_" data-uid="C1.Util.DX.Direct2D.Layer.#ctor(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.Direct2D.Layer.-ctor.html#C1_Util_DX_Direct2D_Layer__ctor_System_IntPtr_">Layer(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct2D.Layer.html">Layer</a> class.</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="methods">Methods
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget_" data-uid="C1.Util.DX.Direct2D.Layer.Create(C1.Util.DX.Direct2D.RenderTarget)">
          <a class="xref" href="C1.Util.DX.Direct2D.Layer.Create.html#C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget_">Create(RenderTarget)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size. The layer resource is allocated to the minimum size when {{PushLayer}} is called.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget_System_Nullable_C1_Util_DX_Size2F__" data-uid="C1.Util.DX.Direct2D.Layer.Create(C1.Util.DX.Direct2D.RenderTarget,System.Nullable{C1.Util.DX.Size2F})">
          <a class="xref" href="C1.Util.DX.Direct2D.Layer.Create.html#C1_Util_DX_Direct2D_Layer_Create_C1_Util_DX_Direct2D_RenderTarget_System_Nullable_C1_Util_DX_Size2F__">Create(RenderTarget, Size2F?)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Layer_GetSize" data-uid="C1.Util.DX.Direct2D.Layer.GetSize">
          <a class="xref" href="C1.Util.DX.Direct2D.Layer.GetSize.html#C1_Util_DX_Direct2D_Layer_GetSize">GetSize()</a>
        </td>
        <td class="markdown level1 summary"><p>D2D_SIZE_F ID2D1Layer::GetSize()</p>
</td>
      </tr>
    </tbody>
  </table>
  <h3 id="operators">Operators
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="C1_Util_DX_Direct2D_Layer_op_Explicit_System_IntPtr__C1_Util_DX_Direct2D_Layer" data-uid="C1.Util.DX.Direct2D.Layer.op_Explicit(System.IntPtr)~C1.Util.DX.Direct2D.Layer">
          <a class="xref" href="C1.Util.DX.Direct2D.Layer.op_Explicit.html#C1_Util_DX_Direct2D_Layer_op_Explicit_System_IntPtr__C1_Util_DX_Direct2D_Layer">explicit operator Layer(IntPtr)</a>
        </td>
        <td class="markdown level1 summary"><p>Performs an explicit conversion from <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.intptr">IntPtr</a> to <a class="xref" href="C1.Util.DX.Direct2D.Layer.html">Layer</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
