public ImageSurface(ref byte[] data, Cairo.Format format, int width, int height, int stride) { surface = CairoAPI.cairo_image_surface_create_for_data(data, format, width, height, stride); lock (surfaces.SyncRoot){ surfaces [surface] = this; } }
public static Cairo.Surface CreateForImage( ref byte[] data, Cairo.Format format, int width, int height, int stride) { IntPtr p = CairoAPI.cairo_image_surface_create_for_data( data, format, width, height, stride); return(new Cairo.Surface(p, true)); }