[cairo-commit] rcairo/src rb_cairo_context.c,1.22,1.23

Kouhei Sutou commit at pdx.freedesktop.org
Sun Jul 20 17:45:14 PDT 2008


Committed by: kou

Update of /cvs/cairo/rcairo/src
In directory kemper:/tmp/cvs-serv15948/src

Modified Files:
	rb_cairo_context.c 
Log Message:
* src/rb_cairo_context.c (cr_set_source_generic): accept surface
  without width and height.


Index: rb_cairo_context.c
===================================================================
RCS file: /cvs/cairo/rcairo/src/rb_cairo_context.c,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -d -r1.22 -r1.23
--- rb_cairo_context.c	12 Jun 2008 10:59:54 -0000	1.22
+++ rb_cairo_context.c	21 Jul 2008 00:45:11 -0000	1.23
@@ -318,6 +318,12 @@
     {
       return cr_set_source_rgba (argc, argv, self);
     }
+  else if (n == 1 && rb_cairo__is_kind_of (arg1, rb_cCairo_Surface))
+    {
+      return cr_set_source_surface (self, arg1,
+                                    rb_float_new (0),
+                                    rb_float_new (0));
+    }
   else if (n == 1)
     {
       return cr_set_source (self, arg1);
@@ -336,7 +342,7 @@
                 "invalid argument (expect "
                 "(red, green, blue), (red, green, blue, alpha), "
                 "([red, green, blue]), ([red, green, blue, alpha]), "
-                "(pattern) or (surface, x, y))");
+                "(surface), (pattern) or (surface, x, y))");
     }
 }
 



More information about the cairo-commit mailing list