[]
        
(Showing Draft Content)

GrapeCity.Documents.DX.DirectWrite.GdiInterop

Class GdiInterop

Namespace
GrapeCity.Documents.DX.DirectWrite
Assembly
GcDocs.DX.Windows.dll

IDWriteGdiInterop

[Guid("1edd9491-9853-4299-898f-6432983b6f3a")]
public class GdiInterop : ComObject, IDisposable, IUnknown
Inheritance
object
GdiInterop
Implements
System.IDisposable
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Constructors

GdiInterop(IntPtr)

Initializes a new instance of the GdiInterop class.

public GdiInterop(IntPtr nativePtr)

Parameters

nativePtr System.IntPtr

The native pointer.

Methods

ConvertFontFaceToLOGFONT(FontFace, IntPtr)

HRESULT IDWriteGdiInterop::ConvertFontFaceToLOGFONT([In] IDWriteFontFace* font,[In] void* logFont)

public void ConvertFontFaceToLOGFONT(FontFace font, IntPtr logFont)

Parameters

font FontFace
logFont System.IntPtr

ConvertFontToLOGFONT(Font, IntPtr, out Bool)

HRESULT IDWriteGdiInterop::ConvertFontToLOGFONT([In] IDWriteFont* font,[In] void* logFont,[Out] BOOL* isSystemFont)

public void ConvertFontToLOGFONT(Font font, IntPtr logFont, out Bool isSystemFont)

Parameters

font Font
logFont System.IntPtr
isSystemFont Bool

CreateBitmapRenderTarget(IntPtr, int, int)

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)

Parameters

hdc System.IntPtr
width int
height int

Returns

BitmapRenderTarget

CreateFontFaceFromHdc(IntPtr)

HRESULT IDWriteGdiInterop::CreateFontFaceFromHdc([In] HDC hdc,[Out] IDWriteFontFace** fontFace)

public FontFace CreateFontFaceFromHdc(IntPtr hdc)

Parameters

hdc System.IntPtr

Returns

FontFace

CreateFontFromLOGFONT(IntPtr)

HRESULT IDWriteGdiInterop::CreateFontFromLOGFONT([In] const void* logFont,[Out] IDWriteFont** font)

public Font CreateFontFromLOGFONT(IntPtr logFont)

Parameters

logFont System.IntPtr

Returns

Font

FromLogFont(object)

Creates a font object that matches the properties specified by the LOGFONT structure.

public Font FromLogFont(object logFont)

Parameters

logFont object

A structure containing a GDI-compatible font description.

Returns

Font

a reference to a newly created Font.

ToLogFont(Font, object)

Initializes a LOGFONT structure based on the GDI-compatible properties of the specified font.

public bool ToLogFont(Font font, object logFont)

Parameters

font Font

An Font object to be converted into a GDI-compatible LOGFONT structure.

logFont object

When this method returns, contains a structure that receives a GDI-compatible font description.

Returns

bool

TRUE if the specified font object is part of the system font collection; otherwise, FALSE.

Remarks

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.

Operators

explicit operator GdiInterop(IntPtr)

Performs an explicit conversion from System.IntPtr to GdiInterop.

public static explicit operator GdiInterop(IntPtr nativePointer)

Parameters

nativePointer System.IntPtr

Returns

GdiInterop