示例#1
0
文件: Glyph.cs 项目: 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;
		}
示例#2
0
文件: Context.cs 项目: viticm/pap2
        public void GlyphPath(Matrix matrix, Glyph[] glyphs)
        {

            IntPtr ptr;

            ptr = FromGlyphToUnManagedMemory(glyphs);

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

            Marshal.FreeHGlobal(ptr);

        }