예제 #1
0
        public virtual void DrawGlyphRun(
            System.Numerics.Vector2 baselineOrigin,
            ref DWRITE_GLYPH_RUN glyphRun,
            ref DWRITE_GLYPH_RUN_DESCRIPTION glyphRunDescription,
            ID2D1Brush foregroundBrush,
            DWRITE_MEASURING_MODE measuringMode
            )
        {
            var fp = GetFunctionPointer(82);

            if (m_DrawGlyphRunFunc == null)
            {
                m_DrawGlyphRunFunc = (DrawGlyphRunFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawGlyphRunFunc));
            }

            m_DrawGlyphRunFunc(m_ptr, baselineOrigin, ref glyphRun, ref glyphRunDescription, foregroundBrush != null ? foregroundBrush.Ptr : IntPtr.Zero, measuringMode);
        }
예제 #2
0
        public virtual int DrawGlyphRun(
            IntPtr clientDrawingContext,
            float baselineOriginX,
            float baselineOriginY,
            DWRITE_MEASURING_MODE measuringMode,
            ref DWRITE_GLYPH_RUN glyphRun,
            ref DWRITE_GLYPH_RUN_DESCRIPTION glyphRunDescription,
            IUnknown clientDrawingEffect
            )
        {
            var fp = GetFunctionPointer(6);

            if (m_DrawGlyphRunFunc == null)
            {
                m_DrawGlyphRunFunc = (DrawGlyphRunFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(DrawGlyphRunFunc));
            }

            return(m_DrawGlyphRunFunc(m_ptr, clientDrawingContext, baselineOriginX, baselineOriginY, measuringMode, ref glyphRun, ref glyphRunDescription, clientDrawingEffect != null ? clientDrawingEffect.Ptr : IntPtr.Zero));
        }