Esempio n. 1
0
File: Glyph.cs Progetto: viticm/pap2
		internal static IntPtr GlyphsToIntPtr (Glyph[] glyphs)
		{
			int size = Marshal.SizeOf (glyphs[0]);
			IntPtr dest = Marshal.AllocHGlobal (size * glyphs.Length);
			int pos = dest.ToInt32 ();
			for (int i = 0; i < glyphs.Length; i++, pos += size)
				Marshal.StructureToPtr (glyphs[i], (IntPtr) pos, false);
			return dest;
		}
Esempio n. 2
0
        public void GlyphPath(Matrix matrix, Glyph[] glyphs)
        {

            IntPtr ptr;

            ptr = FromGlyphToUnManagedMemory(glyphs);

            CairoAPI.cairo_glyph_path(state, ptr, glyphs.Length);

            Marshal.FreeHGlobal(ptr);

        }