[]
IDWriteGdiInterop
[Guid("1edd9491-9853-4299-898f-6432983b6f3a")]
public class GdiInterop : ComObject, IDisposable, IUnknown
Initializes a new instance of the GdiInterop class.
public GdiInterop(IntPtr nativePtr)
nativePtr
System.IntPtrThe native pointer.
HRESULT IDWriteGdiInterop::ConvertFontFaceToLOGFONT([In] IDWriteFontFace* font,[In] void* logFont)
public void ConvertFontFaceToLOGFONT(FontFace font, IntPtr logFont)
font
FontFacelogFont
System.IntPtrHRESULT IDWriteGdiInterop::ConvertFontToLOGFONT([In] IDWriteFont* font,[In] void* logFont,[Out] BOOL* isSystemFont)
public void ConvertFontToLOGFONT(Font font, IntPtr logFont, out Bool isSystemFont)
HRESULT IDWriteGdiInterop::CreateBitmapRenderTarget([In, Optional] HDC hdc,[In] unsigned int width,[In] unsigned int height,[Out] IDWriteBitmapRenderTarget** renderTarget)
public BitmapRenderTarget CreateBitmapRenderTarget(IntPtr hdc, int width, int height)
hdc
System.IntPtrwidth
intheight
intHRESULT IDWriteGdiInterop::CreateFontFaceFromHdc([In] HDC hdc,[Out] IDWriteFontFace** fontFace)
public FontFace CreateFontFaceFromHdc(IntPtr hdc)
hdc
System.IntPtrHRESULT IDWriteGdiInterop::CreateFontFromLOGFONT([In] const void* logFont,[Out] IDWriteFont** font)
public Font CreateFontFromLOGFONT(IntPtr logFont)
logFont
System.IntPtrCreates a font object that matches the properties specified by the LOGFONT structure.
public Font FromLogFont(object logFont)
logFont
objectA structure containing a GDI-compatible font description.
Initializes a LOGFONT structure based on the GDI-compatible properties of the specified font.
public bool ToLogFont(Font font, object logFont)
font
FontAn Font object to be converted into a GDI-compatible LOGFONT structure.
logFont
objectWhen this method returns, contains a structure that receives a GDI-compatible font description.
TRUE if the specified font object is part of the system font collection; otherwise, FALSE.
The conversion to a LOGFONT by using ConvertFontToLOGFONT operates at the logical font level and does not guarantee that it will map to a specific physical font. It is not guaranteed that GDI will select the same physical font for displaying text formatted by a LOGFONT as the Font object that was converted.
Performs an explicit conversion from System.IntPtr to GdiInterop.
public static explicit operator GdiInterop(IntPtr nativePointer)
nativePointer
System.IntPtr