Ejemplo n.º 1
0
 public void SetScriptAnalysis(int textPosition, int textLength, SharpDX.DirectWrite.ScriptAnalysis scriptAnalysis)
 {
     this._scriptAnalysis = scriptAnalysis;
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Gets the glyphs (TODO doc)
        /// </summary>
        /// <param name="textString">The text string.</param>
        /// <param name="textLength">Length of the text.</param>
        /// <param name="fontFace">The font face.</param>
        /// <param name="isSideways">if set to <c>true</c> [is sideways].</param>
        /// <param name="isRightToLeft">if set to <c>true</c> [is right to left].</param>
        /// <param name="scriptAnalysis">The script analysis.</param>
        /// <param name="localeName">Name of the locale.</param>
        /// <param name="numberSubstitution">The number substitution.</param>
        /// <param name="features">The features.</param>
        /// <param name="featureRangeLengths">The feature range lengths.</param>
        /// <param name="maxGlyphCount">The max glyph count.</param>
        /// <param name="clusterMap">The cluster map.</param>
        /// <param name="textProps">The text props.</param>
        /// <param name="glyphIndices">The glyph indices.</param>
        /// <param name="glyphProps">The glyph props.</param>
        /// <param name="actualGlyphCount">The actual glyph count.</param>
        /// <returns>
        /// If the method succeeds, it returns <see cref="Result.Ok"/>.
        /// </returns>
        /// <unmanaged>HRESULT IDWriteTextAnalyzer::GetGlyphs([In, Buffer] const wchar_t* textString,[In] unsigned int textLength,[In] IDWriteFontFace* fontFace,[In] BOOL isSideways,[In] BOOL isRightToLeft,[In] const DWRITE_SCRIPT_ANALYSIS* scriptAnalysis,[In, Buffer, Optional] const wchar_t* localeName,[In, Optional] IDWriteNumberSubstitution* numberSubstitution,[In, Optional] const void** features,[In, Buffer, Optional] const unsigned int* featureRangeLengths,[In] unsigned int featureRanges,[In] unsigned int maxGlyphCount,[Out, Buffer] unsigned short* clusterMap,[Out, Buffer] DWRITE_SHAPING_TEXT_PROPERTIES* textProps,[Out, Buffer] unsigned short* glyphIndices,[Out, Buffer] DWRITE_SHAPING_GLYPH_PROPERTIES* glyphProps,[Out] unsigned int* actualGlyphCount)</unmanaged>
        public void GetGlyphs(string textString, int textLength, SharpDX.DirectWrite.FontFace fontFace, bool isSideways, bool isRightToLeft, SharpDX.DirectWrite.ScriptAnalysis scriptAnalysis, string localeName, SharpDX.DirectWrite.NumberSubstitution numberSubstitution, FontFeature[][] features, int[] featureRangeLengths, int maxGlyphCount, short[] clusterMap, SharpDX.DirectWrite.ShapingTextProperties[] textProps, short[] glyphIndices, SharpDX.DirectWrite.ShapingGlyphProperties[] glyphProps, out int actualGlyphCount)
        {
            var pFeatures = AllocateFeatures(features);

            try
            {
                GetGlyphs(
                    textString,
                    textLength,
                    fontFace,
                    isSideways,
                    isRightToLeft,
                    scriptAnalysis,
                    localeName,
                    numberSubstitution,
                    pFeatures,
                    featureRangeLengths,
                    featureRangeLengths == null ? 0 : featureRangeLengths.Length,
                    maxGlyphCount,
                    clusterMap,
                    textProps,
                    glyphIndices,
                    glyphProps,
                    out actualGlyphCount);
            } finally
            {
                if (pFeatures != IntPtr.Zero)
                {
                    Marshal.FreeHGlobal(pFeatures);
                }
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Gets the GDI compatible glyph placements.
        /// </summary>
        /// <param name="textString">The text string.</param>
        /// <param name="clusterMap">The cluster map.</param>
        /// <param name="textProps">The text props.</param>
        /// <param name="textLength">Length of the text.</param>
        /// <param name="glyphIndices">The glyph indices.</param>
        /// <param name="glyphProps">The glyph props.</param>
        /// <param name="glyphCount">The glyph count.</param>
        /// <param name="fontFace">The font face.</param>
        /// <param name="fontEmSize">Size of the font em.</param>
        /// <param name="pixelsPerDip">The pixels per dip.</param>
        /// <param name="transform">The transform.</param>
        /// <param name="useGdiNatural">if set to <c>true</c> [use GDI natural].</param>
        /// <param name="isSideways">if set to <c>true</c> [is sideways].</param>
        /// <param name="isRightToLeft">if set to <c>true</c> [is right to left].</param>
        /// <param name="scriptAnalysis">The script analysis.</param>
        /// <param name="localeName">Name of the locale.</param>
        /// <param name="features">The features.</param>
        /// <param name="featureRangeLengths">The feature range lengths.</param>
        /// <param name="glyphAdvances">The glyph advances.</param>
        /// <param name="glyphOffsets">The glyph offsets.</param>
        /// <returns>
        /// If the method succeeds, it returns <see cref="Result.Ok"/>.
        /// </returns>
        /// <unmanaged>HRESULT IDWriteTextAnalyzer::GetGdiCompatibleGlyphPlacements([In, Buffer] const wchar_t* textString,[In, Buffer] const unsigned short* clusterMap,[In, Buffer] DWRITE_SHAPING_TEXT_PROPERTIES* textProps,[In] unsigned int textLength,[In, Buffer] const unsigned short* glyphIndices,[In, Buffer] const DWRITE_SHAPING_GLYPH_PROPERTIES* glyphProps,[In] unsigned int glyphCount,[In] IDWriteFontFace* fontFace,[In] float fontEmSize,[In] float pixelsPerDip,[In, Optional] const DWRITE_MATRIX* transform,[In] BOOL useGdiNatural,[In] BOOL isSideways,[In] BOOL isRightToLeft,[In] const DWRITE_SCRIPT_ANALYSIS* scriptAnalysis,[In, Buffer, Optional] const wchar_t* localeName,[In, Optional] const void** features,[In, Buffer, Optional] const unsigned int* featureRangeLengths,[In] unsigned int featureRanges,[Out, Buffer] float* glyphAdvances,[Out, Buffer] DWRITE_GLYPH_OFFSET* glyphOffsets)</unmanaged>
        public void GetGdiCompatibleGlyphPlacements(string textString, short[] clusterMap, SharpDX.DirectWrite.ShapingTextProperties[] textProps, int textLength, short[] glyphIndices, SharpDX.DirectWrite.ShapingGlyphProperties[] glyphProps, int glyphCount, SharpDX.DirectWrite.FontFace fontFace, float fontEmSize, float pixelsPerDip, RawMatrix3x2?transform, bool useGdiNatural, bool isSideways, bool isRightToLeft, SharpDX.DirectWrite.ScriptAnalysis scriptAnalysis, string localeName, FontFeature[][] features, int[] featureRangeLengths, float[] glyphAdvances, SharpDX.DirectWrite.GlyphOffset[] glyphOffsets)
        {
            var pFeatures = AllocateFeatures(features);

            try
            {
                GetGdiCompatibleGlyphPlacements(
                    textString,
                    clusterMap,
                    textProps,
                    textLength,
                    glyphIndices,
                    glyphProps,
                    glyphCount,
                    fontFace,
                    fontEmSize,
                    pixelsPerDip,
                    transform,
                    useGdiNatural,
                    isSideways,
                    isRightToLeft,
                    scriptAnalysis,
                    localeName,
                    pFeatures,
                    featureRangeLengths,
                    featureRangeLengths == null ? 0 : featureRangeLengths.Length,
                    glyphAdvances,
                    glyphOffsets
                    );
            }
            finally
            {
                if (pFeatures != IntPtr.Zero)
                {
                    Marshal.FreeHGlobal(pFeatures);
                }
            }
        }
Ejemplo n.º 4
0
 public static unsafe int Calliint188(void *thisObject, void *arg0, float arg1, SharpDX.DirectWrite.ScriptAnalysis arg2, int arg3, int arg4, int arg5, void *arg6, void *arg7, void *arg8, void *arg9, void *arg10, void *arg11, void *arg12, void *arg13, void *arg14, void *arg15, void *arg16, void *methodPtr)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 5
0
 public static unsafe int Calliint184(void *thisObject, SharpDX.DirectWrite.ScriptAnalysis arg0, void *arg1, void *methodPtr)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 6
0
 public static unsafe int Calliint182(void *thisObject, void *arg0, int arg1, SharpDX.Mathematics.Interop.RawBool arg2, SharpDX.Mathematics.Interop.RawBool arg3, SharpDX.DirectWrite.ScriptAnalysis arg4, void *arg5, void *arg6, void *arg7, void *methodPtr)
 {
     throw new NotImplementedException();
 }