Esempio n. 1
0
        public virtual int GetGlyphRunWorldBounds(
            System.Numerics.Vector2 baselineOrigin,
            ref DWRITE_GLYPH_RUN glyphRun,
            DWRITE_MEASURING_MODE measuringMode,
            out System.Numerics.Vector4 bounds
            )
        {
            var fp = GetFunctionPointer(72);

            if (m_GetGlyphRunWorldBoundsFunc == null)
            {
                m_GetGlyphRunWorldBoundsFunc = (GetGlyphRunWorldBoundsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGlyphRunWorldBoundsFunc));
            }

            return(m_GetGlyphRunWorldBoundsFunc(m_ptr, baselineOrigin, ref glyphRun, measuringMode, out bounds));
        }
Esempio n. 2
0
        public virtual void DrawGlyphRun(
            System.Numerics.Vector2 baselineOrigin,
            ref DWRITE_GLYPH_RUN glyphRun,
            ID2D1Brush foregroundBrush,
            DWRITE_MEASURING_MODE measuringMode
            )
        {
            var fp = GetFunctionPointer(29);

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

            m_DrawGlyphRunFunc(m_ptr, baselineOrigin, ref glyphRun, foregroundBrush != null ? foregroundBrush.Ptr : IntPtr.Zero, measuringMode);
        }
Esempio n. 3
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));
        }
Esempio n. 4
0
        public virtual int DrawGlyphRun(
            float baselineOriginX,
            float baselineOriginY,
            DWRITE_MEASURING_MODE measuringMode,
            ref DWRITE_GLYPH_RUN glyphRun,
            IDWriteRenderingParams renderingParams,
            uint textColor,
            out tagRECT blackBoxRect
            )
        {
            var fp = GetFunctionPointer(3);

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

            return(m_DrawGlyphRunFunc(m_ptr, baselineOriginX, baselineOriginY, measuringMode, ref glyphRun, renderingParams != null ? renderingParams.Ptr : IntPtr.Zero, textColor, out blackBoxRect));
        }
Esempio n. 5
0
        public virtual int CreateGlyphRunAnalysis(
            ref DWRITE_GLYPH_RUN glyphRun,
            float pixelsPerDip,
            ref DWRITE_MATRIX transform,
            DWRITE_RENDERING_MODE renderingMode,
            DWRITE_MEASURING_MODE measuringMode,
            float baselineOriginX,
            float baselineOriginY,
            out IDWriteGlyphRunAnalysis glyphRunAnalysis
            )
        {
            var fp = GetFunctionPointer(23);

            if (m_CreateGlyphRunAnalysisFunc == null)
            {
                m_CreateGlyphRunAnalysisFunc = (CreateGlyphRunAnalysisFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateGlyphRunAnalysisFunc));
            }
            glyphRunAnalysis = new IDWriteGlyphRunAnalysis();
            return(m_CreateGlyphRunAnalysisFunc(m_ptr, ref glyphRun, pixelsPerDip, ref transform, renderingMode, measuringMode, baselineOriginX, baselineOriginY, out glyphRunAnalysis.PtrForNew));
        }