Hello there.

Thanks for the Cairo chicken egg!  I've found it very useful!

I'm attaching a patch (made against the code in Chicken's official
egg) with some small improvements (mostly the declaration of some
additional functions and a minor bug fix).

Would you be okay if I also commit my changes to the version we keep
in the Eggs Subversion repository?  Would you be willing to use that
one as our main development branch?  I'd really like to continue
improving it (adding declarations for functions as I need them) and
having access to the development branch would greatly help me.

Thanks!

Alejo.
http://azul.freaks-unidos.net/
Index: cairo.scm
===================================================================
--- cairo.scm   (revision 673)
+++ cairo.scm   (working copy)
@@ -96,6 +96,13 @@
 
 ;; %%% TO DO Several surface creation procedures
 
+(define cairo-image-surface-create
+  (foreign-lambda cairo_surface_t
+                  "cairo_image_surface_create"
+                  integer
+                  int
+                  int))
+
 (define cairo-image-surface-create-for-data (foreign-lambda cairo_surface_t 
"cairo_image_surface_create_for_data"
                                                             (pointer byte)
                                                             integer
@@ -286,6 +293,8 @@
 
 (define cairo-fill (foreign-lambda void "cairo_fill" cairo_t))
 
+(define cairo-fill-preserve (foreign-lambda void "cairo_fill_preserve" 
cairo_t))
+
 ; ------------------------------------------------
 
 ; Insideness testing ... mneh
@@ -302,14 +311,14 @@
     (lambda () (maker (make-byte-vector sizeof-cairo-text-extents)))))
 
 (define-record-printer (cairo-text-extents-type te out)
-  (for-each (lambda (x) (display x out)
-                    (list "#<cairo-text-extents "
-                          (cairo-text-extents-x-bearing te)" "
-                          (cairo-text-extents-y-bearing te)" "
-                          (cairo-text-extents-width te)" "
-                          (cairo-text-extents-height te)" "
-                          (cairo-text-extents-x-advance te)" "
-                          (cairo-text-extents-y-advance te)">"))))
+  (for-each (lambda (x) (display x out))
+            (list "#<cairo-text-extents "
+                  (cairo-text-extents-x-bearing te)" "
+                  (cairo-text-extents-y-bearing te)" "
+                  (cairo-text-extents-width te)" "
+                  (cairo-text-extents-height te)" "
+                  (cairo-text-extents-x-advance te)" "
+                  (cairo-text-extents-y-advance te)">")))
 
 (define-foreign-type cairo_text_extents_t (pointer "cairo_text_extents_t")
   (lambda (te) 
@@ -554,3 +563,12 @@
                   "cairo_matrix_transform_point"
                   cairo_matrix_t
                   f64vector f64vector))
+
+; PNG
+
+(define cairo-surface-write-to-png
+  (foreign-lambda integer ;; cairo_status_t
+                  "cairo_surface_write_to_png"
+                  cairo_surface_t
+                  c-string))
+
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to