From: Matt Birkholz Date: Mon, 12 Mar 2018 16:21:26 +0000 (-0700) Subject: cairo: Undo previous; do NOT use glib. Require colors (no names). X-Git-Tag: mit-scheme-pucked-x11-0.2.2~48 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=af937a030aa83ad6c3b9df7fe0bd67186964116d;p=mit-scheme.git cairo: Undo previous; do NOT use glib. Require colors (no names). --- diff --git a/src/cairo/cairo.scm b/src/cairo/cairo.scm index e6bd01114..79da4f4d2 100644 --- a/src/cairo/cairo.scm +++ b/src/cairo/cairo.scm @@ -124,12 +124,11 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (cairo-pattern-add-color-stop pattern offset color) (guarantee-cairo-pattern pattern 'cairo-pattern-add-color-stop) - (let ((c (if (color? color) - color - (with-glib-lock - (lambda () (->color color 'cairo-pattern-add-color-stop)))))) - (C-call "cairo_pattern_add_color_stop_rgba" pattern (->flonum offset) - (color-red c) (color-green c) (color-blue c) (color-alpha c)))) + (guarantee-color color 'cairo-pattern-add-color-stop) + (C-call "cairo_pattern_add_color_stop_rgba" + pattern (->flonum offset) + (color-red color) (color-green color) (color-blue color) + (color-alpha color))) (define (cairo-create surface) (guarantee-cairo-surface surface 'cairo-create) @@ -186,12 +185,10 @@ Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. (define (cairo-set-source-color cairo color) (guarantee-cairo cairo 'cairo-set-source-color) - (let ((c (if (color? color) - color - (with-glib-lock - (lambda () (->color color 'cairo-set-source-color)))))) - (C-call "cairo_set_source_rgba" cairo - (color-red c) (color-green c) (color-blue c) (color-alpha c)))) + (guarantee-color color 'cairo-set-source-color) + (C-call "cairo_set_source_rgba" cairo + (color-red color) (color-green color) (color-blue color) + (color-alpha color))) (define (cairo-set-source cairo pattern) (guarantee-cairo cairo 'cairo-set-source)