public static void SurfaceToPngStream(Surface surface, BinaryWriter writer) { var obj = new CairoStreamWriter(writer); var fn = new cairo_write_func_t(obj.do_write); var status = cairo_surface_write_to_png_stream(surface.Handle, fn, IntPtr.Zero); if (status != Status.Success) throw new InvalidOperationException("Status: " + status); }
public static void SurfaceToPngStream(Surface surface, BinaryWriter writer) { var obj = new CairoStreamWriter(writer); var fn = new cairo_write_func_t(obj.do_write); var status = cairo_surface_write_to_png_stream(surface.Handle, fn, IntPtr.Zero); if (status != Status.Success) { throw new InvalidOperationException("Status: " + status); } }