Add cairo-surface-write-to-png.
authorMatt Birkholz <matt@birkholz.chandler.az.us>
Sun, 7 Apr 2013 17:18:56 +0000 (10:18 -0700)
committerMatt Birkholz <matt@birkholz.chandler.az.us>
Sun, 7 Apr 2013 17:18:56 +0000 (10:18 -0700)
This should really use cairo_surface_write_to_png_stream.

src/gtk/cairo.scm
src/gtk/gtk.pkg

index cbb22f62efe2ab7b6d185a447ef69c13bb4ad046..0c3bbb007cd600e1a948a77aeabaeb7e9e958579 100644 (file)
@@ -65,6 +65,11 @@ USA.
       object
       (error:wrong-type-argument object "a cairo_surface_t alien" operator)))
 
+(define (cairo-surface-write-to-png surface filename)
+  (guarantee-cairo-surface surface 'cairo-surface-write-to-png)
+  (guarantee-string filename 'cairo-surface-write-to-png)
+  (C-call "cairo_surface_write_to_png" surface filename))
+
 (define (cairo-surface-flush surface)
   (guarantee-cairo-surface surface 'cairo-surface-flush)
   (C-call "cairo_surface_flush" surface))
index f6844947326eeb597fed4b66693e29b89c29fde8..bea8ed11449f01f4fb89615de5ed5ed599a94b67 100644 (file)
@@ -134,6 +134,7 @@ USA.
   (export (gtk)
          cairo-image-surface-create
          cairo-surface-destroy
+         cairo-surface-write-to-png
          cairo-surface-flush
          cairo-pattern-create-linear
          cairo-pattern-create-radial