# C1.Util.DX.DirectWrite.GdiInterop

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="C1_Util_DX_DirectWrite_GdiInterop" data-uid="C1.Util.DX.DirectWrite.GdiInterop" class="text-break">GdiInterop Class
</h1>
  <div class="markdown level0 summary"><p>IDWriteGdiInterop</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">GdiInterop</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.DirectWrite.html">C1.Util.DX.DirectWrite</a></h6>
  <h6><strong>Assembly</strong>: C1.Win.DX.10.dll</h6>
  <h5 id="C1_Util_DX_DirectWrite_GdiInterop_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">[Guid(&quot;1edd9491-9853-4299-898f-6432983b6f3a&quot;)]
public class GdiInterop : ComObject, IDisposable, IUnknown</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">&lt;Guid(&quot;1edd9491-9853-4299-898f-6432983b6f3a&quot;)&gt;
Public Class GdiInterop
    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_DirectWrite_GdiInterop__ctor_System_IntPtr_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.#ctor(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.-ctor.html#C1_Util_DX_DirectWrite_GdiInterop__ctor_System_IntPtr_">GdiInterop(nint)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a new instance of the <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.html">GdiInterop</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_DirectWrite_GdiInterop_ConvertFontFaceToLOGFONT_C1_Util_DX_DirectWrite_FontFace_System_IntPtr_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.ConvertFontFaceToLOGFONT(C1.Util.DX.DirectWrite.FontFace,System.IntPtr)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.ConvertFontFaceToLOGFONT.html#C1_Util_DX_DirectWrite_GdiInterop_ConvertFontFaceToLOGFONT_C1_Util_DX_DirectWrite_FontFace_System_IntPtr_">ConvertFontFaceToLOGFONT(FontFace, nint)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDWriteGdiInterop::ConvertFontFaceToLOGFONT([In] IDWriteFontFace* font,[In] void* logFont)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_ConvertFontToLOGFONT_C1_Util_DX_DirectWrite_Font_System_IntPtr_C1_Util_DX_Bool__" data-uid="C1.Util.DX.DirectWrite.GdiInterop.ConvertFontToLOGFONT(C1.Util.DX.DirectWrite.Font,System.IntPtr,C1.Util.DX.Bool@)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.ConvertFontToLOGFONT.html#C1_Util_DX_DirectWrite_GdiInterop_ConvertFontToLOGFONT_C1_Util_DX_DirectWrite_Font_System_IntPtr_C1_Util_DX_Bool__">ConvertFontToLOGFONT(Font, nint, out Bool)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDWriteGdiInterop::ConvertFontToLOGFONT([In] IDWriteFont* font,[In] void* logFont,[Out] BOOL* isSystemFont)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_CreateBitmapRenderTarget_System_IntPtr_System_Int32_System_Int32_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.CreateBitmapRenderTarget(System.IntPtr,System.Int32,System.Int32)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.CreateBitmapRenderTarget.html#C1_Util_DX_DirectWrite_GdiInterop_CreateBitmapRenderTarget_System_IntPtr_System_Int32_System_Int32_">CreateBitmapRenderTarget(nint, int, int)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDWriteGdiInterop::CreateBitmapRenderTarget([In, Optional] HDC hdc,[In] unsigned int width,[In] unsigned int height,[Out] IDWriteBitmapRenderTarget** renderTarget)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_CreateFontFaceFromHdc_System_IntPtr_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.CreateFontFaceFromHdc(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.CreateFontFaceFromHdc.html#C1_Util_DX_DirectWrite_GdiInterop_CreateFontFaceFromHdc_System_IntPtr_">CreateFontFaceFromHdc(nint)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDWriteGdiInterop::CreateFontFaceFromHdc([In] HDC hdc,[Out] IDWriteFontFace** fontFace)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_CreateFontFromLOGFONT_System_IntPtr_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.CreateFontFromLOGFONT(System.IntPtr)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.CreateFontFromLOGFONT.html#C1_Util_DX_DirectWrite_GdiInterop_CreateFontFromLOGFONT_System_IntPtr_">CreateFontFromLOGFONT(nint)</a>
        </td>
        <td class="markdown level1 summary"><p>HRESULT IDWriteGdiInterop::CreateFontFromLOGFONT([In] const void* logFont,[Out] IDWriteFont** font)</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_FromLogFont_System_Object_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.FromLogFont(System.Object)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.FromLogFont.html#C1_Util_DX_DirectWrite_GdiInterop_FromLogFont_System_Object_">FromLogFont(object)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a font object that matches the properties specified by the LOGFONT structure.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_FromSystemDrawingFont_System_Drawing_Font_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.FromSystemDrawingFont(System.Drawing.Font)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.FromSystemDrawingFont.html#C1_Util_DX_DirectWrite_GdiInterop_FromSystemDrawingFont_System_Drawing_Font_">FromSystemDrawingFont(Font)</a>
        </td>
        <td class="markdown level1 summary"><p>Creates a font object that matches the properties specified by the LOGFONT structure.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_ToLogFont_C1_Util_DX_DirectWrite_Font_System_Object_" data-uid="C1.Util.DX.DirectWrite.GdiInterop.ToLogFont(C1.Util.DX.DirectWrite.Font,System.Object)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.ToLogFont.html#C1_Util_DX_DirectWrite_GdiInterop_ToLogFont_C1_Util_DX_DirectWrite_Font_System_Object_">ToLogFont(Font, object)</a>
        </td>
        <td class="markdown level1 summary"><p>Initializes a LOGFONT structure based on the GDI-compatible properties of the specified font.</p>
</td>
      </tr>
      <tr>
        <td id="C1_Util_DX_DirectWrite_GdiInterop_ToSystemDrawingFont_C1_Util_DX_DirectWrite_Font_System_Drawing_Font__" data-uid="C1.Util.DX.DirectWrite.GdiInterop.ToSystemDrawingFont(C1.Util.DX.DirectWrite.Font,System.Drawing.Font@)">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.ToSystemDrawingFont.html#C1_Util_DX_DirectWrite_GdiInterop_ToSystemDrawingFont_C1_Util_DX_DirectWrite_Font_System_Drawing_Font__">ToSystemDrawingFont(Font, out Font)</a>
        </td>
        <td class="markdown level1 summary"><p>Convert a Direct2D <a class="xref" href="C1.Util.DX.DirectWrite.Font.html">Font</a> to a <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.font">Font</a>.</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_DirectWrite_GdiInterop_op_Explicit_System_IntPtr__C1_Util_DX_DirectWrite_GdiInterop" data-uid="C1.Util.DX.DirectWrite.GdiInterop.op_Explicit(System.IntPtr)~C1.Util.DX.DirectWrite.GdiInterop">
          <a class="xref" href="C1.Util.DX.DirectWrite.GdiInterop.op_Explicit.html#C1_Util_DX_DirectWrite_GdiInterop_op_Explicit_System_IntPtr__C1_Util_DX_DirectWrite_GdiInterop">explicit operator GdiInterop(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.DirectWrite.GdiInterop.html">GdiInterop</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
