# C1.Util.DX.Direct2D.Factory

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Util_DX_Direct2D_Factory" data-uid="C1.Util.DX.Direct2D.Factory" class="text-break">Factory Class
</h1>
  <div class="markdown level0 summary"><p>ID2D1Factory</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"><span class="xref">Factory</span></div>
      <div class="level5"><a class="xref" href="C1.Util.DX.Direct2D.Factory1.html">Factory1</a></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.Win.DX.10.dll</h6>
  <h5 id="C1_Util_DX_Direct2D_Factory_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[Guid(&quot;06152247-6f50-465a-9245-118bfd3b6007&quot;)]
public class Factory : ComObject, IDisposable, IUnknown</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;Guid(&quot;06152247-6f50-465a-9245-118bfd3b6007&quot;)&gt;
Public Class Factory
    Inherits ComObject
    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_Factory__ctor_System_IntPtr_" data-uid="C1.Util.DX.Direct2D.Factory.#ctor(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.-ctor.html#C1_Util_DX_Direct2D_Factory__ctor_System_IntPtr_">Factory(nint)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.Direct2D.Factory.html">Factory</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_Factory_CreateDCRenderTarget_C1_Util_DX_Direct2D_RenderTargetProperties__" data-uid="C1.Util.DX.Direct2D.Factory.CreateDCRenderTarget(C1.Util.DX.Direct2D.RenderTargetProperties@)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateDCRenderTarget.html#C1_Util_DX_Direct2D_Factory_CreateDCRenderTarget_C1_Util_DX_Direct2D_RenderTargetProperties__">CreateDCRenderTarget(ref RenderTargetProperties)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateDCRenderTarget([In] const D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties,[Out, Fast] ID2D1DCRenderTarget** dcRenderTarget)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateDrawingStateBlock_System_Nullable_C1_Util_DX_Direct2D_DrawingStateDescription__C1_Util_DX_DirectWrite_RenderingParams_" data-uid="C1.Util.DX.Direct2D.Factory.CreateDrawingStateBlock(System.Nullable{C1.Util.DX.Direct2D.DrawingStateDescription},C1.Util.DX.DirectWrite.RenderingParams)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateDrawingStateBlock.html#C1_Util_DX_Direct2D_Factory_CreateDrawingStateBlock_System_Nullable_C1_Util_DX_Direct2D_DrawingStateDescription__C1_Util_DX_DirectWrite_RenderingParams_">CreateDrawingStateBlock(DrawingStateDescription?, RenderingParams)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateDrawingStateBlock([In, Optional] const D2D1_DRAWING_STATE_DESCRIPTION* drawingStateDescription,[In, Optional] IDWriteRenderingParams* textRenderingParams,[Out, Fast] ID2D1DrawingStateBlock** drawingStateBlock)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateDxgiSurfaceRenderTarget_C1_Util_DX_DXGI_Surface_C1_Util_DX_Direct2D_RenderTargetProperties__" data-uid="C1.Util.DX.Direct2D.Factory.CreateDxgiSurfaceRenderTarget(C1.Util.DX.DXGI.Surface,C1.Util.DX.Direct2D.RenderTargetProperties@)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateDxgiSurfaceRenderTarget.html#C1_Util_DX_Direct2D_Factory_CreateDxgiSurfaceRenderTarget_C1_Util_DX_DXGI_Surface_C1_Util_DX_Direct2D_RenderTargetProperties__">CreateDxgiSurfaceRenderTarget(Surface, ref RenderTargetProperties)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateDxgiSurfaceRenderTarget([In] IDXGISurface* dxgiSurface,[In] const D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties,[Out, Fast] ID2D1RenderTarget** renderTarget)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateEllipseGeometry_C1_Util_DX_Direct2D_Ellipse_" data-uid="C1.Util.DX.Direct2D.Factory.CreateEllipseGeometry(C1.Util.DX.Direct2D.Ellipse)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateEllipseGeometry.html#C1_Util_DX_Direct2D_Factory_CreateEllipseGeometry_C1_Util_DX_Direct2D_Ellipse_">CreateEllipseGeometry(Ellipse)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateEllipseGeometry([In] const D2D1_ELLIPSE* ellipse,[Out, Fast] ID2D1EllipseGeometry** ellipseGeometry)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateGeometryGroup_C1_Util_DX_Direct2D_FillMode_C1_Util_DX_ComArray_C1_Util_DX_Direct2D_Geometry__System_Int32_" data-uid="C1.Util.DX.Direct2D.Factory.CreateGeometryGroup(C1.Util.DX.Direct2D.FillMode,C1.Util.DX.ComArray{C1.Util.DX.Direct2D.Geometry},System.Int32)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateGeometryGroup.html#C1_Util_DX_Direct2D_Factory_CreateGeometryGroup_C1_Util_DX_Direct2D_FillMode_C1_Util_DX_ComArray_C1_Util_DX_Direct2D_Geometry__System_Int32_">CreateGeometryGroup(FillMode, ComArray&lt;Geometry&gt;, int)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateGeometryGroup([In] D2D1_FILL_MODE fillMode,[In, Buffer] ID2D1Geometry** geometries,[In] unsigned int geometriesCount,[Out, Fast] ID2D1GeometryGroup** geometryGroup)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateGeometryGroup_C1_Util_DX_Direct2D_FillMode_C1_Util_DX_Direct2D_Geometry___System_Int32_" data-uid="C1.Util.DX.Direct2D.Factory.CreateGeometryGroup(C1.Util.DX.Direct2D.FillMode,C1.Util.DX.Direct2D.Geometry[],System.Int32)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateGeometryGroup.html#C1_Util_DX_Direct2D_Factory_CreateGeometryGroup_C1_Util_DX_Direct2D_FillMode_C1_Util_DX_Direct2D_Geometry___System_Int32_">CreateGeometryGroup(FillMode, Geometry[], int)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateGeometryGroup([In] D2D1_FILL_MODE fillMode,[In, Buffer] ID2D1Geometry** geometries,[In] unsigned int geometriesCount,[Out, Fast] ID2D1GeometryGroup** geometryGroup)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateHwndRenderTarget_C1_Util_DX_Direct2D_RenderTargetProperties__C1_Util_DX_Direct2D_HwndRenderTargetProperties_" data-uid="C1.Util.DX.Direct2D.Factory.CreateHwndRenderTarget(C1.Util.DX.Direct2D.RenderTargetProperties@,C1.Util.DX.Direct2D.HwndRenderTargetProperties)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateHwndRenderTarget.html#C1_Util_DX_Direct2D_Factory_CreateHwndRenderTarget_C1_Util_DX_Direct2D_RenderTargetProperties__C1_Util_DX_Direct2D_HwndRenderTargetProperties_">CreateHwndRenderTarget(ref RenderTargetProperties, HwndRenderTargetProperties)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateHwndRenderTarget([In] const D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties,[In] const D2D1_HWND_RENDER_TARGET_PROPERTIES* hwndRenderTargetProperties,[Out, Fast] ID2D1HwndRenderTarget** hwndRenderTarget)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreatePathGeometry" data-uid="C1.Util.DX.Direct2D.Factory.CreatePathGeometry">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreatePathGeometry.html#C1_Util_DX_Direct2D_Factory_CreatePathGeometry">CreatePathGeometry()</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreatePathGeometry([Out, Fast] ID2D1PathGeometry** pathGeometry)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateRectangleGeometry_C1_Util_DX_RectF_" data-uid="C1.Util.DX.Direct2D.Factory.CreateRectangleGeometry(C1.Util.DX.RectF)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateRectangleGeometry.html#C1_Util_DX_Direct2D_Factory_CreateRectangleGeometry_C1_Util_DX_RectF_">CreateRectangleGeometry(RectF)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateRectangleGeometry([In] const D2D_RECT_F* rectangle,[Out, Fast] ID2D1RectangleGeometry** rectangleGeometry)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateRoundedRectangleGeometry_C1_Util_DX_Direct2D_RoundedRectangle__" data-uid="C1.Util.DX.Direct2D.Factory.CreateRoundedRectangleGeometry(C1.Util.DX.Direct2D.RoundedRectangle@)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateRoundedRectangleGeometry.html#C1_Util_DX_Direct2D_Factory_CreateRoundedRectangleGeometry_C1_Util_DX_Direct2D_RoundedRectangle__">CreateRoundedRectangleGeometry(ref RoundedRectangle)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateRoundedRectangleGeometry([In] const D2D1_ROUNDED_RECT* roundedRectangle,[Out, Fast] ID2D1RoundedRectangleGeometry** roundedRectangleGeometry)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateStrokeStyle_C1_Util_DX_Direct2D_StrokeStyleProperties__" data-uid="C1.Util.DX.Direct2D.Factory.CreateStrokeStyle(C1.Util.DX.Direct2D.StrokeStyleProperties@)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateStrokeStyle.html#C1_Util_DX_Direct2D_Factory_CreateStrokeStyle_C1_Util_DX_Direct2D_StrokeStyleProperties__">CreateStrokeStyle(ref StrokeStyleProperties)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateStrokeStyle([In] const D2D1_STROKE_STYLE_PROPERTIES* strokeStyleProperties,[In, Buffer, Optional] const float* dashes,[In] unsigned int dashesCount,[Out, Fast] ID2D1StrokeStyle** strokeStyle)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateStrokeStyle_C1_Util_DX_Direct2D_StrokeStyleProperties__System_Single___" data-uid="C1.Util.DX.Direct2D.Factory.CreateStrokeStyle(C1.Util.DX.Direct2D.StrokeStyleProperties@,System.Single[])">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateStrokeStyle.html#C1_Util_DX_Direct2D_Factory_CreateStrokeStyle_C1_Util_DX_Direct2D_StrokeStyleProperties__System_Single___">CreateStrokeStyle(ref StrokeStyleProperties, float[])</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateStrokeStyle([In] const D2D1_STROKE_STYLE_PROPERTIES* strokeStyleProperties,[In, Buffer, Optional] const float* dashes,[In] unsigned int dashesCount,[Out, Fast] ID2D1StrokeStyle** strokeStyle)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateTransformedGeometry_C1_Util_DX_Direct2D_Geometry_C1_Util_DX_Matrix3x2__" data-uid="C1.Util.DX.Direct2D.Factory.CreateTransformedGeometry(C1.Util.DX.Direct2D.Geometry,C1.Util.DX.Matrix3x2@)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateTransformedGeometry.html#C1_Util_DX_Direct2D_Factory_CreateTransformedGeometry_C1_Util_DX_Direct2D_Geometry_C1_Util_DX_Matrix3x2__">CreateTransformedGeometry(Geometry, ref Matrix3x2)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateTransformedGeometry([In] ID2D1Geometry* sourceGeometry,[In] const D2D_MATRIX_3X2_F* transform,[Out, Fast] ID2D1TransformedGeometry** transformedGeometry)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_CreateWicBitmapRenderTarget_C1_Util_DX_WIC_Bitmap_C1_Util_DX_Direct2D_RenderTargetProperties__" data-uid="C1.Util.DX.Direct2D.Factory.CreateWicBitmapRenderTarget(C1.Util.DX.WIC.Bitmap,C1.Util.DX.Direct2D.RenderTargetProperties@)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.CreateWicBitmapRenderTarget.html#C1_Util_DX_Direct2D_Factory_CreateWicBitmapRenderTarget_C1_Util_DX_WIC_Bitmap_C1_Util_DX_Direct2D_RenderTargetProperties__">CreateWicBitmapRenderTarget(Bitmap, ref RenderTargetProperties)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::CreateWicBitmapRenderTarget([In] IWICBitmap* target,[In] const D2D1_RENDER_TARGET_PROPERTIES* renderTargetProperties,[Out, Fast] ID2D1RenderTarget** renderTarget)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_GetDesktopDpi_System_Single__System_Single__" data-uid="C1.Util.DX.Direct2D.Factory.GetDesktopDpi(System.Single@,System.Single@)">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.GetDesktopDpi.html#C1_Util_DX_Direct2D_Factory_GetDesktopDpi_System_Single__System_Single__">GetDesktopDpi(out float, out float)</a>
        </td>
        <td class="markdown level1 summary"><p>void ID2D1Factory::GetDesktopDpi([Out] float* dpiX,[Out] float* dpiY)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_Direct2D_Factory_ReloadSystemMetrics" data-uid="C1.Util.DX.Direct2D.Factory.ReloadSystemMetrics">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.ReloadSystemMetrics.html#C1_Util_DX_Direct2D_Factory_ReloadSystemMetrics">ReloadSystemMetrics()</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT ID2D1Factory::ReloadSystemMetrics()</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_Factory_op_Explicit_System_IntPtr__C1_Util_DX_Direct2D_Factory" data-uid="C1.Util.DX.Direct2D.Factory.op_Explicit(System.IntPtr)~C1.Util.DX.Direct2D.Factory">
          <a class="xref" href="C1.Util.DX.Direct2D.Factory.op_Explicit.html#C1_Util_DX_Direct2D_Factory_op_Explicit_System_IntPtr__C1_Util_DX_Direct2D_Factory">explicit operator Factory(nint)</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">nint</a> to <a class="xref" href="C1.Util.DX.Direct2D.Factory.html">Factory</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
