Beispiel #1
0
        public virtual int GetGdiCompatibleGlyphPlacements(
            ref ushort textString,
            ref ushort clusterMap,
            out DWRITE_SHAPING_TEXT_PROPERTIES textProps,
            uint textLength,
            ref ushort glyphIndices,
            ref DWRITE_SHAPING_GLYPH_PROPERTIES glyphProps,
            uint glyphCount,
            IDWriteFontFace fontFace,
            float fontEmSize,
            float pixelsPerDip,
            ref DWRITE_MATRIX transform,
            int useGdiNatural,
            int isSideways,
            int isRightToLeft,
            ref DWRITE_SCRIPT_ANALYSIS scriptAnalysis,
            ref ushort localeName,
            ref IntPtr features,
            ref uint featureRangeLengths,
            uint featureRanges,
            out float glyphAdvances,
            out DWRITE_GLYPH_OFFSET glyphOffsets
            )
        {
            var fp = GetFunctionPointer(9);

            if (m_GetGdiCompatibleGlyphPlacementsFunc == null)
            {
                m_GetGdiCompatibleGlyphPlacementsFunc = (GetGdiCompatibleGlyphPlacementsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGdiCompatibleGlyphPlacementsFunc));
            }

            return(m_GetGdiCompatibleGlyphPlacementsFunc(m_ptr, ref textString, ref clusterMap, out textProps, textLength, ref glyphIndices, ref glyphProps, glyphCount, fontFace != null ? fontFace.Ptr : IntPtr.Zero, fontEmSize, pixelsPerDip, ref transform, useGdiNatural, isSideways, isRightToLeft, ref scriptAnalysis, ref localeName, ref features, ref featureRangeLengths, featureRanges, out glyphAdvances, out glyphOffsets));
        }
Beispiel #2
0
        public virtual int GetCurrentTransform(
            out DWRITE_MATRIX transform
            )
        {
            var fp = GetFunctionPointer(7);

            if (m_GetCurrentTransformFunc == null)
            {
                m_GetCurrentTransformFunc = (GetCurrentTransformFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetCurrentTransformFunc));
            }

            return(m_GetCurrentTransformFunc(m_ptr, out transform));
        }
Beispiel #3
0
        public virtual int SetCurrentTransform(
            ref DWRITE_MATRIX transform
            )
        {
            var fp = GetFunctionPointer(8);

            if (m_SetCurrentTransformFunc == null)
            {
                m_SetCurrentTransformFunc = (SetCurrentTransformFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(SetCurrentTransformFunc));
            }

            return(m_SetCurrentTransformFunc(m_ptr, ref transform));
        }
Beispiel #4
0
        public virtual int GetGdiCompatibleMetrics(
            float emSize,
            float pixelsPerDip,
            ref DWRITE_MATRIX transform,
            out DWRITE_FONT_METRICS fontFaceMetrics
            )
        {
            var fp = GetFunctionPointer(16);

            if (m_GetGdiCompatibleMetricsFunc == null)
            {
                m_GetGdiCompatibleMetricsFunc = (GetGdiCompatibleMetricsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGdiCompatibleMetricsFunc));
            }

            return(m_GetGdiCompatibleMetricsFunc(m_ptr, emSize, pixelsPerDip, ref transform, out fontFaceMetrics));
        }
Beispiel #5
0
        public virtual int GetGdiCompatibleGlyphMetrics(
            float emSize,
            float pixelsPerDip,
            ref DWRITE_MATRIX transform,
            int useGdiNatural,
            ref ushort glyphIndices,
            uint glyphCount,
            out DWRITE_GLYPH_METRICS glyphMetrics,
            int isSideways
            )
        {
            var fp = GetFunctionPointer(17);

            if (m_GetGdiCompatibleGlyphMetricsFunc == null)
            {
                m_GetGdiCompatibleGlyphMetricsFunc = (GetGdiCompatibleGlyphMetricsFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGdiCompatibleGlyphMetricsFunc));
            }

            return(m_GetGdiCompatibleGlyphMetricsFunc(m_ptr, emSize, pixelsPerDip, ref transform, useGdiNatural, ref glyphIndices, glyphCount, out glyphMetrics, isSideways));
        }
Beispiel #6
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));
        }
Beispiel #7
0
        public virtual int CreateGdiCompatibleTextLayout(
            ref ushort _string,
            uint stringLength,
            IDWriteTextFormat textFormat,
            float layoutWidth,
            float layoutHeight,
            float pixelsPerDip,
            ref DWRITE_MATRIX transform,
            int useGdiNatural,
            out IDWriteTextLayout textLayout
            )
        {
            var fp = GetFunctionPointer(19);

            if (m_CreateGdiCompatibleTextLayoutFunc == null)
            {
                m_CreateGdiCompatibleTextLayoutFunc = (CreateGdiCompatibleTextLayoutFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(CreateGdiCompatibleTextLayoutFunc));
            }
            textLayout = new IDWriteTextLayout();
            return(m_CreateGdiCompatibleTextLayoutFunc(m_ptr, ref _string, stringLength, textFormat != null ? textFormat.Ptr : IntPtr.Zero, layoutWidth, layoutHeight, pixelsPerDip, ref transform, useGdiNatural, out textLayout.PtrForNew));
        }