public virtual int GetFontCollection( out IDWriteFontCollection fontCollection ) { var fp = GetFunctionPointer(3); if (m_GetFontCollectionFunc == null) { m_GetFontCollectionFunc = (GetFontCollectionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFontCollectionFunc)); } fontCollection = new IDWriteFontCollection(); return(m_GetFontCollectionFunc(m_ptr, out fontCollection.PtrForNew)); }
public virtual int SetFontCollection( IDWriteFontCollection fontCollection, DWRITE_TEXT_RANGE textRange ) { var fp = GetFunctionPointer(30); if (m_SetFontCollectionFunc == null) { m_SetFontCollectionFunc = (SetFontCollectionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(SetFontCollectionFunc)); } return(m_SetFontCollectionFunc(m_ptr, fontCollection != null ? fontCollection.Ptr : IntPtr.Zero, textRange)); }
public virtual int GetFontCollection( uint currentPosition, out IDWriteFontCollection fontCollection, out DWRITE_TEXT_RANGE textRange ) { var fp = GetFunctionPointer(44); if (m_GetFontCollectionFunc == null) { m_GetFontCollectionFunc = (GetFontCollectionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFontCollectionFunc)); } fontCollection = new IDWriteFontCollection(); return(m_GetFontCollectionFunc(m_ptr, currentPosition, out fontCollection.PtrForNew, out textRange)); }
public virtual int CreateCustomFontCollection( IDWriteFontCollectionLoader collectionLoader, IntPtr collectionKey, uint collectionKeySize, out IDWriteFontCollection fontCollection ) { var fp = GetFunctionPointer(4); if (m_CreateCustomFontCollectionFunc == null) { m_CreateCustomFontCollectionFunc = (CreateCustomFontCollectionFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateCustomFontCollectionFunc)); } fontCollection = new IDWriteFontCollection(); return(m_CreateCustomFontCollectionFunc(m_ptr, collectionLoader != null ? collectionLoader.Ptr : IntPtr.Zero, collectionKey, collectionKeySize, out fontCollection.PtrForNew)); }
public virtual int CreateTextFormat( ref ushort fontFamilyName, IDWriteFontCollection fontCollection, DWRITE_FONT_WEIGHT fontWeight, DWRITE_FONT_STYLE fontStyle, DWRITE_FONT_STRETCH fontStretch, float fontSize, ref ushort localeName, out IDWriteTextFormat textFormat ) { var fp = GetFunctionPointer(15); if (m_CreateTextFormatFunc == null) { m_CreateTextFormatFunc = (CreateTextFormatFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateTextFormatFunc)); } textFormat = new IDWriteTextFormat(); return(m_CreateTextFormatFunc(m_ptr, ref fontFamilyName, fontCollection != null ? fontCollection.Ptr : IntPtr.Zero, fontWeight, fontStyle, fontStretch, fontSize, ref localeName, out textFormat.PtrForNew)); }