[Cairo] Image functions

Alexandre Pigolkine pigolkine at gmx.de
Tue Oct 14 14:04:58 PDT 2003

I think that cairo_move_to specifies a position on the destination
surface where to put a bitmap and I am missing a way to 
specify a position on the source surface from where to start.
Something like:
copy from source pos xs, ys, width, height to 
destination pos xd,yd. 
Currently xs,ys are always 0's for me and for my purposes I modified the
code to be:

cvs -d :pserver:anoncvs at cvs.cairographics.org:/cvs/cairo -z3 diff -u
cvs server: Diffing .
cvs server: Diffing src
Index: src/cairo_gstate.c
RCS file: /cvs/cairo/cairo/src/cairo_gstate.c,v
retrieving revision 1.19
diff -u -r1.19 cairo_gstate.c
--- src/cairo_gstate.c  4 Oct 2003 16:06:16 -0000       1.19
+++ src/cairo_gstate.c  12 Oct 2003 12:57:30 -0000
@@ -1474,7 +1474,7 @@
        what I expect. Need to fix this. */
     _cairo_surface_composite (gstate->operator,
                              surface, mask, gstate->surface,
-                             device_x, device_y,
+                             0, 0,
                              0, 0,
                              device_x, device_y,

But IMHO it'll be nice to have a more general variant.


>On Oct 14, Alexandre Pigolkine wrote:
 > Is there a way to specify an origin on the source surface or shall I use
 > a different function ?

>You'll want to call cairo_move_to to set the current point before
>calling cairo_show_surface.
>Is that what you were missing? If not, I may have misunderstood.

More information about the cairo mailing list