Exemple #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));
        }
Exemple #2
0
        public virtual int GetGlyphRunOutline(
            float emSize,
            ref ushort glyphIndices,
            ref float glyphAdvances,
            ref DWRITE_GLYPH_OFFSET glyphOffsets,
            uint glyphCount,
            int isSideways,
            int isRightToLeft,
            ID2D1SimplifiedGeometrySink geometrySink
            )
        {
            var fp = GetFunctionPointer(14);

            if (m_GetGlyphRunOutlineFunc == null)
            {
                m_GetGlyphRunOutlineFunc = (GetGlyphRunOutlineFunc)Marshal.GetDelegateForFunctionPointer(fp, typeof(GetGlyphRunOutlineFunc));
            }

            return(m_GetGlyphRunOutlineFunc(m_ptr, emSize, ref glyphIndices, ref glyphAdvances, ref glyphOffsets, glyphCount, isSideways, isRightToLeft, geometrySink != null ? geometrySink.Ptr : IntPtr.Zero));
        }