source: project/release/4/cairo/trunk/cairo.scm @ 25893

Last change on this file since 25893 was 25893, checked in by Christian Kellermann, 9 years ago

Adding support for ps/pdf/svg surfaces thanks to Markus Klotzbuecher.

File size: 22.7 KB
Line 
1;; Cairo vector graphics bindings for Chicken Scheme
2;
3; Copyright (C) 2004, 2005 Michael Bridgen <mikeb@squaremobius.net>,
4;                          Tony Garnock-Jones <tonyg@kcbbs.gen.nz>
5;
6; This library is free software; you can redistribute it and/or modify
7; it under the terms of the GNU Library General Public License as
8; published by the Free Software Foundation; either version 2 of the
9; License, or (at your option) any later version.
10;
11; This library is distributed in the hope that it will be useful, but
12; WITHOUT ANY WARRANTY; without even the implied warranty of
13; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14; Library General Public License for more details.
15;
16; You should have received a copy of the GNU Library General Public
17; License along with this library; if not, write to the Free
18; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
19; USA
20
21; --------------------------------------------------
22
23(module cairo
24 *
25 (import chicken scheme foreign)
26
27 (use srfi-1)
28 (use srfi-4)
29 (use srfi-13)
30 (use lolevel)
31
32 (import-for-syntax srfi-1)
33 (import-for-syntax srfi-13)
34
35 (foreign-declare #<<EOF
36
37#include "cairo.h"
38#include "cairo-svg.h"
39#include "cairo-pdf.h"
40#include "cairo-ps.h"
41EOF
42)
43
44;; Define a list of DEFINEs or enums at once.
45(define-syntax --cairo-flags
46  (lambda (e r c)
47    (let ((strs (cdr e)))
48      `(begin
49         ,@(append-map (lambda (str)
50                         (let* ((sym (string->symbol str))
51                                (psym (string->symbol (string-append "-" (symbol->string sym)))))
52                           `((,(r 'define-foreign-variable) ,psym unsigned-integer ,str)
53                             (,(r 'define) ,sym ,psym))))
54                       strs)))))
55
56(define *cairo-egg-version* '(0 1 3 alpha))
57
58(define cairo-pi (foreign-value "M_PI" float))
59
60;; Functions are mostly in the same order to
61;; cairo.h
62
63;; State manipulation
64;; -----------------------------------------------
65
66;; cairo_t encapsulates the current state
67
68(define-foreign-type cairo_t (c-pointer "cairo_t")
69  values
70  (cut tag-pointer <> 'cairo))
71
72; formerly didn't take the surface argument
73(define cairo-create (foreign-lambda cairo_t "cairo_create"
74                                     cairo_surface_t))
75
76; For reference counting?
77(define cairo-reference (foreign-lambda void "cairo_reference" cairo_t))
78
79(define cairo-destroy (foreign-lambda void "cairo_destroy" cairo_t))
80
81; Save the state of this context (and keep it as the state)
82(define cairo-save (foreign-lambda void "cairo_save" cairo_t))
83
84; Restore the last saved state of this context
85(define cairo-restore (foreign-lambda void "cairo_restore" cairo_t))
86
87; cairo-copy deprecated
88
89; ------------------------------------------------
90
91; Surfaces and backends
92; ------------------------------------------------
93
94;; cairo_surface_t is a drawing surface abstraction
95
96(define-foreign-type cairo_surface_t (c-pointer "cairo_surface_t")
97  values
98  (cut tag-pointer <> 'cairo-surface))
99
100(--cairo-flags "CAIRO_FORMAT_ARGB32"
101               "CAIRO_FORMAT_RGB24"
102               "CAIRO_FORMAT_A8"
103               "CAIRO_FORMAT_A1")
104
105;; %%% TO DO Several surface creation procedures
106
107(define cairo-image-surface-create-for-data (foreign-lambda cairo_surface_t "cairo_image_surface_create_for_data"
108                                                            (c-pointer byte)
109                                                            integer
110                                                            int
111                                                            int
112                                                            int))
113
114(define cairo-svg-surface-create (foreign-lambda cairo_surface_t "cairo_svg_surface_create"
115                                                 c-string
116                                                 double
117                                                 double))
118
119(define cairo-pdf-surface-create (foreign-lambda cairo_surface_t "cairo_pdf_surface_create"
120                                                 c-string
121                                                 double
122                                                 double))
123
124(define cairo-ps-surface-create (foreign-lambda cairo_surface_t "cairo_ps_surface_create"
125                                                c-string
126                                                double
127                                                double))
128
129; cairo-create-image deprecated
130
131; cairo-set-target-image deprecated
132
133(--cairo-flags "CAIRO_OPERATOR_CLEAR"
134               
135               "CAIRO_OPERATOR_SOURCE"
136               "CAIRO_OPERATOR_OVER"
137               "CAIRO_OPERATOR_IN"
138               "CAIRO_OPERATOR_OUT"
139               "CAIRO_OPERATOR_ATOP"
140
141               "CAIRO_OPERATOR_DEST"
142               "CAIRO_OPERATOR_DEST_OVER"
143               "CAIRO_OPERATOR_DEST_IN"
144               "CAIRO_OPERATOR_DEST_OUT"
145               "CAIRO_OPERATOR_DEST_ATOP"
146               
147               "CAIRO_OPERATOR_XOR"
148               "CAIRO_OPERATOR_ADD"
149               "CAIRO_OPERATOR_SATURATE")
150
151; Set the composition operator --
152; see cairo docs or otherwise what they do.
153; http://cairographics.org/samples/snippets.html has
154; pictures of the results.
155(define cairo-set-operator (foreign-lambda void "cairo_set_operator" cairo_t integer))
156
157; formerly cairo-set-rgb-color
158(define cairo-set-source-rgb (foreign-lambda void "cairo_set_source_rgb"
159                                            cairo_t
160                                            double ;red
161                                            double ;green
162                                            double ;blue
163                                            ))
164
165;; Also see cairo-paint-with-alpha
166(define cairo-set-source-rgba (foreign-lambda void "cairo_set_source_rgba"
167                                            cairo_t
168                                            double ;red
169                                            double ;green
170                                            double ;blue
171                                            double ;alpha
172                                            ))
173
174(define cairo-set-source-surface
175  (foreign-lambda void "cairo_set_source_surface"
176                  cairo_t
177                  cairo_surface_t
178                  double ;x
179                  double ;y
180                  ))
181
182; ?
183(define cairo-set-tolerance (foreign-lambda void "cairo_set_tolerance" cairo_t double))
184;; -----------------------------------------------
185;;
186;; Antialias and fill
187;; -----------------------------------------------
188
189(--cairo-flags "CAIRO_ANTIALIAS_DEFAULT"
190               "CAIRO_ANTIALIAS_NONE"
191               "CAIRO_ANTIALIAS_GRAY"
192               "CAIRO_ANTIALIAS_SUBPIXEL")
193
194(define cairo-set-antialias (foreign-lambda void "cairo_set_antialias" cairo_t integer))
195
196(--cairo-flags "CAIRO_FILL_RULE_WINDING"
197               "CAIRO_FILL_RULE_EVEN_ODD")
198
199; Set the fill rule:
200; 'winding' is like a union (anything inside a path)
201; 'even-odd' is like xor (anything inside an odd number of paths)
202(define cairo-set-fill-rule (foreign-lambda void "cairo_set_fill_rule" cairo_t integer))
203
204; ------------------------------------------------
205
206; Lines, joins, and caps
207; ------------------------------------------------
208
209(define cairo-set-line-width (foreign-lambda void "cairo_set_line_width" cairo_t double))
210
211(--cairo-flags "CAIRO_LINE_CAP_BUTT"
212               "CAIRO_LINE_CAP_ROUND"
213               "CAIRO_LINE_CAP_SQUARE")
214
215(define cairo-set-line-cap (foreign-lambda void "cairo_set_line_cap" cairo_t integer))
216
217(--cairo-flags "CAIRO_LINE_JOIN_MITER"
218               "CAIRO_LINE_JOIN_ROUND"
219               "CAIRO_LINE_JOIN_BEVEL")
220
221(define cairo-set-line-join (foreign-lambda void "cairo_set_line_join" cairo_t integer))
222
223(define cairo-set-dash (foreign-lambda void "cairo_set_dash" cairo_t f64vector integer double))
224
225(define cairo-set-miter-limit (foreign-lambda void "cairo_set_miter_limit" cairo_t double))
226
227; ------------------------------------------------
228
229; Context transform operations
230; ------------------------------------------------
231
232;; These following operate on the current transform of
233;; the context -- there are also operations on arbitrary
234;; transforms further on (but perhaps not yet)
235
236(define cairo-translate (foreign-lambda void "cairo_translate" cairo_t double double))
237
238(define cairo-scale (foreign-lambda void "cairo_scale" cairo_t double double))
239
240(define cairo-rotate (foreign-lambda void "cairo_rotate" cairo_t double))
241
242(define cairo-transform (foreign-lambda void "cairo_transform" cairo_t cairo_matrix_t))
243
244(define cairo-set-matrix (foreign-lambda void "cairo_set_matrix" cairo_t cairo_matrix_t))
245
246(define cairo-identity-matrix (foreign-lambda void "cairo_identity_matrix" cairo_t))
247
248;; Matrix operations
249
250(define-foreign-type cairo_matrix_t (c-pointer "cairo_matrix_t")
251  values
252  (cut tag-pointer <> 'cairo-matrix))
253
254; accessors for each element might be nice, but probably not
255; immediately necessary
256
257; cairo-concat-matrix replaced by cairo-transform
258
259; cairo-matrix-set replaced by cairo-set-matrix
260
261; was cairo-transform-point
262(define cairo-user-to-device (foreign-lambda void "cairo_user_to_device" cairo_t f64vector f64vector))
263
264; was cairo-transform-distance
265(define cairo-user-to-device-distance (foreign-lambda void "cairo_user_to_device" cairo_t f64vector f64vector))
266
267; was cairo-inverse-transform-point
268(define cairo-device-to-user (foreign-lambda void "cairo_device_to_user" cairo_t f64vector f64vector))
269
270; was cairo-inverse-transform-distance
271(define cairo-device-to-user-distance (foreign-lambda void "cairo_device_to_user_distance" cairo_t f64vector f64vector))
272
273; ------------------------------------------------
274
275; Path creation
276; ------------------------------------------------
277
278;; Note that actually drawing paths is destructive;
279;; it will erase the current path.  Use cairo_save
280;; and cairo_restore if you want to use a path for
281;; more than one drawing operation.  Clipping is
282;; _not_ destructive.
283
284(define cairo-new-path (foreign-lambda void "cairo_new_path" cairo_t))
285
286(define cairo-move-to (foreign-lambda void "cairo_move_to" cairo_t double double))
287
288(define cairo-line-to (foreign-lambda void "cairo_line_to" cairo_t double double))
289
290(define cairo-curve-to (foreign-lambda void "cairo_curve_to" cairo_t double double double double double double))
291
292(define cairo-arc (foreign-lambda void "cairo_arc" cairo_t double double double double double))
293
294(define cairo-arc-negative (foreign-lambda void "cairo_arc_negative" cairo_t double double double double double))
295
296;; there's some relative move_to etc. things here .. mneh
297
298(define cairo-rectangle (foreign-lambda void "cairo_rectangle" cairo_t double double double double))
299
300;; Finish the current shape so you can draw another disjoint one
301(define cairo-close-path (foreign-lambda void "cairo_close_path" cairo_t))
302
303; ------------------------------------------------
304
305; Drawing operations
306; ------------------------------------------------
307
308(define cairo-stroke (foreign-lambda void "cairo_stroke" cairo_t))
309
310(define cairo-fill (foreign-lambda void "cairo_fill" cairo_t))
311
312; ------------------------------------------------
313
314; Insideness testing ... mneh
315; ------------------------------------------------
316
317(define-foreign-variable sizeof-cairo-text-extents int "sizeof(cairo_text_extents_t)")
318
319;; We want a garbage-collectable type here; wrap a record type around a byte vector buffer, and make
320;; chicken type-pun the buffer to the C struct.  We only ever construct these to hand to a function
321;; for filling in, so no initialisation needed aside from the buffer.
322(define-record cairo-text-extents-type buffer)
323(let ((maker make-cairo-text-extents-type))
324  (set! make-cairo-text-extents-type
325    (lambda () (maker (make-blob sizeof-cairo-text-extents)))))
326
327(define-record-printer (cairo-text-extents-type te out)
328  (for-each (lambda (x) (display x out))
329                    (list "#<cairo-text-extents "
330                          (cairo-text-extents-x-bearing te)" "
331                          (cairo-text-extents-y-bearing te)" "
332                          (cairo-text-extents-width te)" "
333                          (cairo-text-extents-height te)" "
334                          (cairo-text-extents-x-advance te)" "
335                          (cairo-text-extents-y-advance te)">")))
336
337(define-foreign-type cairo_text_extents_t scheme-pointer cairo-text-extents-type-buffer)
338
339(define cairo-text-extents-x-bearing (foreign-lambda* double ((cairo_text_extents_t te)) "C_return(((cairo_text_extents_t*)te)->x_bearing);"))
340(define cairo-text-extents-y-bearing (foreign-lambda* double ((cairo_text_extents_t te)) "C_return(((cairo_text_extents_t*)te)->y_bearing);"))
341(define cairo-text-extents-width (foreign-lambda* double ((cairo_text_extents_t te)) "C_return(((cairo_text_extents_t*)te)->width);"))
342(define cairo-text-extents-height (foreign-lambda* double ((cairo_text_extents_t te)) "C_return(((cairo_text_extents_t*)te)->height);"))
343(define cairo-text-extents-x-advance (foreign-lambda* double ((cairo_text_extents_t te)) "C_return(((cairo_text_extents_t*)te)->x_advance);"))
344(define cairo-text-extents-y-advance (foreign-lambda* double ((cairo_text_extents_t te)) "C_return(((cairo_text_extents_t*)te)->y_advance);"))
345
346(define cairo-text-extents-x-bearing-set! (foreign-lambda* double ((cairo_text_extents_t te) (double v)) "((cairo_text_extents_t*)te)->x_bearing = v;"))
347(define cairo-text-extents-y-bearing-set! (foreign-lambda* double ((cairo_text_extents_t te) (double v)) "((cairo_text_extents_t*)te)->y_bearing = v;"))
348(define cairo-text-extents-width-set! (foreign-lambda* double ((cairo_text_extents_t te) (double v)) "((cairo_text_extents_t*)te)->width = v;"))
349(define cairo-text-extents-height-set! (foreign-lambda* double ((cairo_text_extents_t te) (double v)) "((cairo_text_extents_t*)te)->height = v;"))
350(define cairo-text-extents-x-advance-set! (foreign-lambda* double ((cairo_text_extents_t te) (double v)) "((cairo_text_extents_t*)te)->x_advance = v;"))
351(define cairo-text-extents-y-advance-set! (foreign-lambda* double ((cairo_text_extents_t te) (double v)) "((cairo_text_extents_t*)te)->y_advance = v;"))
352
353(define-foreign-variable sizeof-cairo-font-extents int "sizeof(cairo_font_extents_t)")
354
355(define-record cairo-font-extents-type buffer)
356(let ((maker make-cairo-font-extents-type))
357  (set! make-cairo-font-extents-type
358    (lambda () (maker (make-blob sizeof-cairo-font-extents)))))
359
360(define-record-printer (cairo-font-extents-type e out)
361  (for-each (lambda (x) (display x out))
362                    (list "#<cairo-font-extents "
363                          (cairo-font-extents-ascent e)" "
364                          (cairo-font-extents-descent e)" "
365                          (cairo-font-extents-height e)" "
366                          (cairo-font-extents-max-x-advance e)" "
367                          (cairo-font-extents-max-y-advance e)">")))
368
369(define-foreign-type cairo_font_extents_t scheme-pointer cairo-font-extents-type-buffer)
370
371(define cairo-font-extents-ascent (foreign-lambda* double ((cairo_font_extents_t e)) "C_return(((cairo_font_extents_t*)e)->ascent);"))
372(define cairo-font-extents-descent (foreign-lambda* double ((cairo_font_extents_t e)) "C_return(((cairo_font_extents_t*)e)->descent);"))
373(define cairo-font-extents-height (foreign-lambda* double ((cairo_font_extents_t e)) "C_return(((cairo_font_extents_t*)e)->height);"))
374(define cairo-font-extents-max-x-advance (foreign-lambda* double ((cairo_font_extents_t e)) "C_return(((cairo_font_extents_t*)e)->max_x_advance);"))
375(define cairo-font-extents-max-y-advance (foreign-lambda* double ((cairo_font_extents_t e)) "C_return(((cairo_font_extents_t*)e)->max_y_advance);"))
376
377(define cairo-font-extents-ascent-set! (foreign-lambda* double ((cairo_font_extents_t e) (double v)) "((cairo_font_extents_t*)e)->ascent = v;"))
378(define cairo-font-extents-descent-set! (foreign-lambda* double ((cairo_font_extents_t e) (double v)) "((cairo_font_extents_t*)e)->descent = v;"))
379(define cairo-font-extents-height-set! (foreign-lambda* double ((cairo_font_extents_t e) (double v)) "((cairo_font_extents_t*)e)->height = v;"))
380(define cairo-font-extents-max-x-advance-set! (foreign-lambda* double ((cairo_font_extents_t e) (double v)) "((cairo_font_extents_t*)e)->max_x_advance = v;"))
381(define cairo-font-extents-max-y-advance-set! (foreign-lambda* double ((cairo_font_extents_t e) (double v)) "((cairo_font_extents_t*)e)->max_y_advance = v;"))
382
383(define cairo-text-extents (foreign-lambda void "cairo_text_extents" cairo_t c-string cairo_text_extents_t))
384
385; was cairo-current-font-extents
386(define cairo-font-extents (foreign-lambda void "cairo_font_extents" cairo_t cairo_font_extents_t))
387
388; Clipping
389; ------------------------------------------------
390
391;; Clipping does reset the path, unless you use the
392;; -preserve functions
393
394; was cairo-init-clip
395(define cairo-reset-clip (foreign-lambda void "cairo_reset_clip" cairo_t))
396
397;; Intersect the current path with the clipping region
398;; for the new clipping region
399(define cairo-clip (foreign-lambda void "cairo_clip" cairo_t))
400
401; ------------------------------------------------
402;
403; Fonts and text
404; ------------------------------------------------
405
406(--cairo-flags
407; font weight
408 "CAIRO_FONT_WEIGHT_NORMAL"
409 "CAIRO_FONT_WEIGHT_BOLD"
410 ; and slant
411 "CAIRO_FONT_SLANT_NORMAL"
412 "CAIRO_FONT_SLANT_ITALIC"
413 "CAIRO_FONT_SLANT_OBLIQUE")
414
415; An easy-osy function for choosing a font to use
416; (as usual, affects the context)
417; was cairo-select-font
418(define cairo-select-font-face
419  (foreign-lambda void "cairo_select_font_face"
420                  cairo_t
421                  c-string
422                  integer ; slant
423                  integer ; weight
424                  ))
425
426;; NB regarding font transforms:
427;; cairo_gstate.c has notes regarding font co-ordinate
428;; systems.  I should read them ;-)
429
430; was cairo-scale-font
431(define cairo-set-font-size
432  (foreign-lambda void "cairo_set_font_size" cairo_t double))
433
434; was cairo-transform-font
435(define cairo-set-font-matrix
436  (foreign-lambda void "cairo_set_font_matrix" cairo_t cairo_matrix_t))
437
438(define cairo-show-text
439  (foreign-lambda void "cairo_show_text" cairo_t c-string))
440
441;; There's also cairo_show_glyphs(), which might be useful
442;; if it's worthwhile caching glyphs (I'll look at the cairo
443;; source -- it may well convert text to glyphs every time)
444
445(define-foreign-type cairo_font_t (c-pointer "cairo_font_t")
446  values
447  (cut tag-pointer <> 'cairo-font))
448
449;; Here would be the text extent stuff, certainly useful
450
451;; .. and here, converting fonts to paths
452
453;; .. and some functions for transforming fonts directly
454
455; ------------------------------------------------
456;
457; Context status and query
458; ------------------------------------------------
459
460; All these used to be -current-, now -get-
461
462(define cairo-get-target
463  (foreign-lambda cairo_surface_t "cairo_get_target" cairo_t))
464
465(define cairo-get-operator
466  (foreign-lambda integer "cairo_get_operator" cairo_t))
467
468; cairo-current-rgb-color deprecated
469
470; cairo-current-alpha deprecated
471
472(define cairo-get-matrix
473  (foreign-lambda void "cairo_get_matrix" cairo_t cairo_matrix_t))
474
475;; and some more skipped
476
477;; cairo_status_t
478(--cairo-flags
479  "CAIRO_STATUS_SUCCESS"
480  "CAIRO_STATUS_NO_MEMORY"
481  "CAIRO_STATUS_INVALID_RESTORE"
482  "CAIRO_STATUS_INVALID_POP_GROUP"
483  "CAIRO_STATUS_NO_CURRENT_POINT"
484  "CAIRO_STATUS_INVALID_MATRIX"
485  "CAIRO_STATUS_INVALID_STATUS"
486  "CAIRO_STATUS_NULL_POINTER"
487  "CAIRO_STATUS_INVALID_STRING"
488  "CAIRO_STATUS_INVALID_PATH_DATA"
489  "CAIRO_STATUS_READ_ERROR"
490  "CAIRO_STATUS_WRITE_ERROR"
491  "CAIRO_STATUS_SURFACE_FINISHED"
492  "CAIRO_STATUS_SURFACE_TYPE_MISMATCH"
493  "CAIRO_STATUS_PATTERN_TYPE_MISMATCH"
494  "CAIRO_STATUS_INVALID_CONTENT"
495  "CAIRO_STATUS_INVALID_FORMAT"
496  "CAIRO_STATUS_INVALID_VISUAL"
497  "CAIRO_STATUS_FILE_NOT_FOUND"
498  "CAIRO_STATUS_INVALID_DASH")
499
500
501
502; ------------------------------------------------
503
504; Matrix operations
505; ------------------------------------------------
506
507; (cairo_matrix_t defined earlier)
508
509; NB: These may be renamed to cairo_transform_* in future
510; versions of Cairo.
511
512(define cairo-matrix-init-identity
513  (foreign-lambda void
514                  "cairo_matrix_init_identity"
515                  cairo_matrix_t))
516
517(define cairo-matrix-init
518  (foreign-lambda void
519                  "cairo_matrix_init"
520                  cairo_matrix_t
521                  double double ;; a, b
522                  double double ;; c, d
523                  double double ;; tx, ty
524                  ))
525
526(define cairo-matrix-translate
527  (foreign-lambda void
528                  "cairo_matrix_translate"
529                  cairo_matrix_t
530                  double double ;; x, y
531                  ))
532
533(define cairo-matrix-scale
534  (foreign-lambda void
535                  "cairo_matrix_scale"
536                  cairo_matrix_t
537                  double double ;; x, y
538                  ))
539
540(define cairo-matrix-rotate
541  (foreign-lambda void
542                  "cairo_matrix_rotate"
543                  cairo_matrix_t
544                  double ;; radians
545                  ))
546
547(define cairo-matrix-invert
548  (foreign-lambda integer ;; cairo_status_t
549                  "cairo_matrix_invert"
550                  cairo_matrix_t))
551
552(define cairo-matrix-multiply
553  (foreign-lambda void
554                  "cairo_matrix_multiply"
555                  cairo_matrix_t ;; dest
556                  cairo_matrix_t
557                  cairo_matrix_t))
558
559(define cairo-matrix-transform-distance
560  (foreign-lambda void
561                  "cairo_matrix_transform_distance"
562                  cairo_matrix_t
563                  f64vector f64vector))
564
565(define cairo-matrix-transform-point
566  (foreign-lambda void
567                  "cairo_matrix_transform_point"
568                  cairo_matrix_t
569                  f64vector f64vector))
570
571; PNG Support
572(define cairo-image-surface-create-from-png (foreign-lambda cairo_surface_t
573                                                            "cairo_image_surface_create_from_png"
574                                                            c-string
575                                                            ))
576
577(define cairo-surface-write-to-png (foreign-lambda integer
578                                                   "cairo_surface_write_to_png"
579                                                   cairo_surface_t
580                                                   c-string
581                                                   ))
582
583; Auxiliary
584(define cairo-image-surface-create (foreign-lambda cairo_surface_t
585                                                   "cairo_image_surface_create"
586                                                   integer
587                                                   integer
588                                                   integer
589                                     ))
590
591(define cairo-image-surface-get-width (foreign-lambda int
592                                                      "cairo_image_surface_get_width"
593                                                      cairo_surface_t))
594
595(define cairo-image-surface-get-height (foreign-lambda int
596                                                       "cairo_image_surface_get_height"
597                                                       cairo_surface_t))
598
599
600(define cairo-paint (foreign-lambda void
601                                    "cairo_paint"
602                                    cairo_t
603                                    ))
604
605(define cairo-paint-with-alpha  (foreign-lambda void
606                                                "cairo_paint_with_alpha"
607                                                cairo_t
608                                                double
609                                                ))
610
611(define cairo-surface-destroy (foreign-lambda void
612                                              "cairo_surface_destroy"
613                                              cairo_surface_t
614                                              ))
615
616(define cairo-surface-flush (foreign-lambda void
617                                            "cairo_surface_flush"
618                                            cairo_surface_t
619                                            ))
620)
Note: See TracBrowser for help on using the repository browser.