# C1.Util.DX.Direct2D.RenderTargetProperties.-ctor

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_Util_DX_Direct2D_RenderTargetProperties__ctor_" data-uid="C1.Util.DX.Direct2D.RenderTargetProperties.#ctor*">RenderTargetProperties Constructor
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_Util_DX_Direct2D_RenderTargetProperties__ctor_" data-uid="C1.Util.DX.Direct2D.RenderTargetProperties.#ctor*"></a>
<h4 id="C1_Util_DX_Direct2D_RenderTargetProperties__ctor_C1_Util_DX_Direct2D_PixelFormat_" data-uid="C1.Util.DX.Direct2D.RenderTargetProperties.#ctor(C1.Util.DX.Direct2D.PixelFormat)">RenderTargetProperties(PixelFormat)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct2D.RenderTargetProperties.html">RenderTargetProperties</a> struct.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTargetProperties(PixelFormat pixelFormat)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(pixelFormat As PixelFormat)</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.Direct2D.PixelFormat.html">PixelFormat</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format and alpha mode of the render target. You can use the {{D2D1::PixelFormat}} function to create a pixel format that specifies that Direct2D should select the pixel format and alpha mode for you. For a list of pixel formats and alpha modes supported by each render target, see {{Supported Pixel Formats and Alpha Modes}}.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_Util_DX_Direct2D_RenderTargetProperties__ctor_" data-uid="C1.Util.DX.Direct2D.RenderTargetProperties.#ctor*"></a>
<h4 id="C1_Util_DX_Direct2D_RenderTargetProperties__ctor_C1_Util_DX_Direct2D_RenderTargetType_C1_Util_DX_Direct2D_PixelFormat_System_Single_System_Single_C1_Util_DX_Direct2D_RenderTargetUsage_C1_Util_DX_Direct2D_FeatureLevel_" data-uid="C1.Util.DX.Direct2D.RenderTargetProperties.#ctor(C1.Util.DX.Direct2D.RenderTargetType,C1.Util.DX.Direct2D.PixelFormat,System.Single,System.Single,C1.Util.DX.Direct2D.RenderTargetUsage,C1.Util.DX.Direct2D.FeatureLevel)">RenderTargetProperties(RenderTargetType, PixelFormat, float, float, RenderTargetUsage, FeatureLevel)</h4>
<div class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct2D.RenderTargetProperties.html">RenderTargetProperties</a> struct.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public RenderTargetProperties(RenderTargetType type, PixelFormat pixelFormat, float dpiX, float dpiY, RenderTargetUsage usage, FeatureLevel minLevel)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub New(type As RenderTargetType, pixelFormat As PixelFormat, dpiX As Single, dpiY As Single, usage As RenderTargetUsage, minLevel As FeatureLevel)</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.Direct2D.RenderTargetType.html">RenderTargetType</a></td>
      <td><span class="parametername">type</span></td>
      <td><p>A value that specifies whether the render target should force hardware or software rendering. A value of <a class="xref" href="C1.Util.DX.Direct2D.RenderTargetType.html#C1_Util_DX_Direct2D_RenderTargetType_Default">Default</a> specifies that the render target should use hardware rendering if it is available; otherwise, it uses software rendering. Note that WIC bitmap render targets do not support hardware rendering.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.PixelFormat.html">PixelFormat</a></td>
      <td><span class="parametername">pixelFormat</span></td>
      <td><p>The pixel format and alpha mode of the render target. You can use the {{D2D1::PixelFormat}} function to create a pixel format that specifies that Direct2D should select the pixel format and alpha mode for you. For a list of pixel formats and alpha modes supported by each render target, see {{Supported Pixel Formats and Alpha Modes}}.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">dpiX</span></td>
      <td><p>The horizontal DPI of the render target.  To use the default DPI, set dpiX and dpiY to 0. For more information, see the Remarks section.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.single">float</a></td>
      <td><span class="parametername">dpiY</span></td>
      <td><p>The vertical DPI of the render target. To use the default DPI, set dpiX and dpiY to 0.  For more information, see the Remarks section.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.RenderTargetUsage.html">RenderTargetUsage</a></td>
      <td><span class="parametername">usage</span></td>
      <td><p>A value that specifies how the render target is remoted and whether it should be GDI-compatible.  Set to <a class="xref" href="C1.Util.DX.Direct2D.RenderTargetUsage.html#C1_Util_DX_Direct2D_RenderTargetUsage_None">None</a> to create a render target that is not compatible with GDI and uses Direct3D command-stream remoting if it  is available.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="C1.Util.DX.Direct2D.FeatureLevel.html">FeatureLevel</a></td>
      <td><span class="parametername">minLevel</span></td>
      <td><p>A value that specifies the minimum Direct3D feature level required for hardware rendering. If the specified minimum level is not available, the render target uses software rendering if the type  member is set to <a class="xref" href="C1.Util.DX.Direct2D.RenderTargetType.html#C1_Util_DX_Direct2D_RenderTargetType_Default">Default</a>; if  type  is set to to D2D1_RENDER_TARGET_TYPE_HARDWARE, render target creation fails. A value of <a class="xref" href="C1.Util.DX.Direct2D.FeatureLevel.html#C1_Util_DX_Direct2D_FeatureLevel_Level_DEFAULT">Level_DEFAULT</a> indicates that Direct2D should determine whether the Direct3D feature level of the device is adequate. This field is used only when creating <a class="xref" href="C1.Util.DX.Direct2D.WindowRenderTarget.html">WindowRenderTarget</a> and <a class="xref" href="C1.Util.DX.Direct2D.DeviceContextRenderTarget.html">DeviceContextRenderTarget</a> objects.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
