Beispiel #1
0
        private void FreeGlyphBuffers()
        {
            GlyphCapacity = 0;

            if (Glyphs != null)
            {
                Memory.Free(Glyphs);
                Glyphs = null;
            }

            if (GlyphVisualAttributes != null)
            {
                Memory.Free(GlyphVisualAttributes);
                GlyphVisualAttributes = null;
            }

            if (GlyphAdvanceWidths != null)
            {
                Memory.Free(GlyphAdvanceWidths);
                GlyphAdvanceWidths = null;
            }

            if (GlyphOffsets != null)
            {
                Memory.Free(GlyphOffsets);
                GlyphOffsets = null;
            }
        }
Beispiel #2
0
 private void ReAllocGlyphBuffers(int newGlyphCapacity)
 {
     Glyphs = (ushort *)Memory.ReAlloc(Glyphs, newGlyphCapacity * sizeof(ushort));
     GlyphVisualAttributes = (SCRIPT_VISATTR *)Memory.ReAlloc(GlyphVisualAttributes, newGlyphCapacity * sizeof(SCRIPT_VISATTR));
     GlyphAdvanceWidths    = (int *)Memory.ReAlloc(GlyphAdvanceWidths, newGlyphCapacity * sizeof(int));
     GlyphOffsets          = (GOFFSET *)Memory.ReAlloc(GlyphOffsets, newGlyphCapacity * sizeof(GOFFSET));
 }
Beispiel #3
0
 private void InitializeGlyphBuffers()
 {
     GlyphCapacity         = 0;
     Glyphs                = null;
     GlyphVisualAttributes = null;
     GlyphAdvanceWidths    = null;
     GlyphOffsets          = null;
 }
Beispiel #4
0
 public static extern int ScriptCPtoX(
     [In] int iCP,
     [In] bool fTrailing,
     [In] int cChars,
     [In] int cGlyphs,
     [In] ushort *pwLogClust,
     [In] SCRIPT_VISATTR *psva,
     [In] int *piAdvance,
     [In] SCRIPT_ANALYSIS *psa,
     [Out] out int piX);
Beispiel #5
0
 public static extern int ScriptXtoCP(
     [In] int iX,
     [In] int cChars,
     [In] int cGlyphs,
     [In] ushort *pwLogClust,
     [In] SCRIPT_VISATTR *psva,
     [In] int *piAdvance,
     [In] SCRIPT_ANALYSIS *psa,
     [Out] out int piCP,
     [Out] out int piTrailing);
Beispiel #6
0
 public static extern int ScriptPlace(
     [In] IntPtr hdc,
     [In, Out] ref IntPtr psc,
     [In] ushort *pwGlyphs,
     [In] int cGlyphs,
     [In] SCRIPT_VISATTR *psva,
     [In, Out] SCRIPT_ANALYSIS *psa,
     [Out] int *piAdvance,
     [Out] GOFFSET *pGoffset,
     [Out] out ABC pABC);
Beispiel #7
0
 public static extern int ScriptShape(
     [In] IntPtr hdc,
     [In, Out] ref IntPtr psc,
     [In] char *pwcChars,
     [In] int cChars,
     [In] int cMaxGlyphs,
     [Out] SCRIPT_ANALYSIS *psa,
     [Out] ushort *pwOutGlyphs,
     [Out] ushort *pwLogClust,
     [Out] SCRIPT_VISATTR *psva,
     [Out] out int pcGlyphs);
        private void FreeGlyphBuffers()
        {
            GlyphCapacity = 0;

            if (Glyphs != null)
            {
                Memory.Free(Glyphs);
                Glyphs = null;
            }

            if (GlyphVisualAttributes != null)
            {
                Memory.Free(GlyphVisualAttributes);
                GlyphVisualAttributes = null;
            }

            if (GlyphAdvanceWidths != null)
            {
                Memory.Free(GlyphAdvanceWidths);
                GlyphAdvanceWidths = null;
            }

            if (GlyphOffsets != null)
            {
                Memory.Free(GlyphOffsets);
                GlyphOffsets = null;
            }
        }
 private void ReAllocGlyphBuffers(int newGlyphCapacity)
 {
     Glyphs = (ushort*)Memory.ReAlloc(Glyphs, newGlyphCapacity * sizeof(ushort));
     GlyphVisualAttributes = (SCRIPT_VISATTR*)Memory.ReAlloc(GlyphVisualAttributes, newGlyphCapacity * sizeof(SCRIPT_VISATTR));
     GlyphAdvanceWidths = (int*)Memory.ReAlloc(GlyphAdvanceWidths, newGlyphCapacity * sizeof(int));
     GlyphOffsets = (GOFFSET*)Memory.ReAlloc(GlyphOffsets, newGlyphCapacity * sizeof(GOFFSET));
 }
 private void InitializeGlyphBuffers()
 {
     GlyphCapacity = 0;
     Glyphs = null;
     GlyphVisualAttributes = null;
     GlyphAdvanceWidths = null;
     GlyphOffsets = null;
 }