From 919418e2f2b667ddb45d37ba5e4fc3473af8141d Mon Sep 17 00:00:00 2001 From: Matt Birkholz Date: Sun, 7 Apr 2013 10:18:56 -0700 Subject: [PATCH] Add cairo-surface-write-to-png. This should really use cairo_surface_write_to_png_stream. --- src/gtk/cairo.scm | 5 +++++ src/gtk/gtk.pkg | 1 + 2 files changed, 6 insertions(+) diff --git a/src/gtk/cairo.scm b/src/gtk/cairo.scm index cbb22f62e..0c3bbb007 100644 --- a/src/gtk/cairo.scm +++ b/src/gtk/cairo.scm @@ -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)) diff --git a/src/gtk/gtk.pkg b/src/gtk/gtk.pkg index f68449473..bea8ed114 100644 --- a/src/gtk/gtk.pkg +++ b/src/gtk/gtk.pkg @@ -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 -- 2.25.1