예제 #1
0
        public virtual int GetFont(
            uint index,
            out IDWriteFont font
            )
        {
            var fp = GetFunctionPointer(5);

            if (m_GetFontFunc == null)
            {
                m_GetFontFunc = (GetFontFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFontFunc));
            }
            font = new IDWriteFont();
            return(m_GetFontFunc(m_ptr, index, out font.PtrForNew));
        }
예제 #2
0
        public virtual int CreateFontFromLOGFONT(
            ref tagLOGFONTW logFont,
            out IDWriteFont font
            )
        {
            var fp = GetFunctionPointer(3);

            if (m_CreateFontFromLOGFONTFunc == null)
            {
                m_CreateFontFromLOGFONTFunc = (CreateFontFromLOGFONTFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateFontFromLOGFONTFunc));
            }
            font = new IDWriteFont();
            return(m_CreateFontFromLOGFONTFunc(m_ptr, ref logFont, out font.PtrForNew));
        }
예제 #3
0
        public virtual int GetFontFromFontFace(
            IDWriteFontFace fontFace,
            out IDWriteFont font
            )
        {
            var fp = GetFunctionPointer(6);

            if (m_GetFontFromFontFaceFunc == null)
            {
                m_GetFontFromFontFaceFunc = (GetFontFromFontFaceFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFontFromFontFaceFunc));
            }
            font = new IDWriteFont();
            return(m_GetFontFromFontFaceFunc(m_ptr, fontFace != null ? fontFace.Ptr : IntPtr.Zero, out font.PtrForNew));
        }
예제 #4
0
        public virtual int ConvertFontToLOGFONT(
            IDWriteFont font,
            out tagLOGFONTW logFont,
            out int isSystemFont
            )
        {
            var fp = GetFunctionPointer(4);

            if (m_ConvertFontToLOGFONTFunc == null)
            {
                m_ConvertFontToLOGFONTFunc = (ConvertFontToLOGFONTFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(ConvertFontToLOGFONTFunc));
            }

            return(m_ConvertFontToLOGFONTFunc(m_ptr, font != null ? font.Ptr : IntPtr.Zero, out logFont, out isSystemFont));
        }
예제 #5
0
        public virtual int GetFirstMatchingFont(
            DWRITE_FONT_WEIGHT weight,
            DWRITE_FONT_STRETCH stretch,
            DWRITE_FONT_STYLE style,
            out IDWriteFont matchingFont
            )
        {
            var fp = GetFunctionPointer(7);

            if (m_GetFirstMatchingFontFunc == null)
            {
                m_GetFirstMatchingFontFunc = (GetFirstMatchingFontFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetFirstMatchingFontFunc));
            }
            matchingFont = new IDWriteFont();
            return(m_GetFirstMatchingFontFunc(m_ptr, weight, stretch, style, out matchingFont.PtrForNew));
        }