public ImageSurface(byte *data, Cairo.Format format, int width, int height, int stride) { surface = CairoAPI.cairo_image_surface_create_for_data(data, (int)format, width, height, stride); lock (surfaces.SyncRoot) { surfaces[surface] = this; } }