예제 #1
0
		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);
		}
예제 #2
0
        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);
            }
        }