(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)))
\f
(define (cairo-create surface)
(guarantee-cairo-surface surface 'cairo-create)
(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)