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; }
public TextExtents GlyphExtents (Glyph[] glyphs) { IntPtr ptr = Context.FromGlyphToUnManagedMemory (glyphs); TextExtents extents; NativeMethods.cairo_scaled_font_glyph_extents (handle, ptr, glyphs.Length, out extents); Marshal.FreeHGlobal (ptr); return extents; }
public NativeGlyph_4byte_longs(Glyph source) { index = (int) source.index; x = source.x; y = source.y; }
internal static IntPtr FromGlyphToUnManagedMemory(Glyph [] glyphs) { IntPtr dest = Marshal.AllocHGlobal (native_glyph_size * glyphs.Length); long pos = dest.ToInt64(); if (c_compiler_long_size == 8){ foreach (Glyph g in glyphs){ Marshal.StructureToPtr (g, (IntPtr)pos, false); pos += native_glyph_size; } } else { foreach (Glyph g in glyphs){ NativeGlyph_4byte_longs n = new NativeGlyph_4byte_longs (g); Marshal.StructureToPtr (n, (IntPtr)pos, false); pos += native_glyph_size; } } return dest; }
public void ShowGlyphs(Matrix matrix, Glyph[] glyphs) { ShowGlyphs (glyphs); }
public void ShowGlyphs(Glyph[] glyphs) { IntPtr ptr; ptr = FromGlyphToUnManagedMemory (glyphs); NativeMethods.cairo_show_glyphs (handle, ptr, glyphs.Length); Marshal.FreeHGlobal (ptr); }
public void GlyphPath(Matrix matrix, Glyph[] glyphs) { GlyphPath (glyphs); }
public void GlyphPath (Matrix matrix, Glyph[] glyphs) { IntPtr ptr; ptr = FromGlyphToUnManagedMemory (glyphs); CairoAPI.cairo_glyph_path (state, ptr, glyphs.Length); Marshal.FreeHGlobal (ptr); }
public void GlyphPath(Glyph[] glyphs) { IntPtr ptr; ptr = FromGlyphToUnManagedMemory (glyphs); NativeMethods.cairo_glyph_path (state, ptr, glyphs.Length); Marshal.FreeHGlobal (ptr); }
public void GlyphPath(Glyph[] glyphs) { CheckDisposed (); IntPtr ptr; ptr = FromGlyphToUnManagedMemory (glyphs); NativeMethods.cairo_glyph_path (handle, ptr, glyphs.Length); Marshal.FreeHGlobal (ptr); }
public TextExtents GlyphExtents(Glyph[] glyphs) { CheckDisposed (); IntPtr ptr = FromGlyphToUnManagedMemory (glyphs); TextExtents extents; NativeMethods.cairo_glyph_extents (handle, ptr, glyphs.Length, out extents); Marshal.FreeHGlobal (ptr); return extents; }
public NativeGlyph_4byte_longs(Glyph source) { index = (int)source.index; x = source.x; y = source.y; }