Hi,<br><br>I have what feels like an obvious question, but I'm having trouble to locate the API that does what I want.<br><br>Suppose I have some arbitrary pre-drawn data in a cairo_surface_t. I want to blit some subrectangle not starting at the origin of this source surface, into the target cairo_t.<br>
<br>The setup for this looks like:<br><br> /* pre-existing source image */<br> cairo_surface_t *source;<br><br> cairo_t *cr = ....; /* hook up to your window system */<br><br>
/* Restrict size of paint to subrectangle requested */<br>
cairo_rectangle(cr, dest_x, dest_y, width, height);<br> cairo_clip(cr);<br><br> cairo_set_source_surface(cr, source, dest_x, dest_y);<br><br> cairo_paint(cr);<br><br><br>But this always takes a subrectangle of source starting at (0, 0). It feels like I want to supply an extra X,Y pair to cairo_set_source_surface() that tells where in the source image to begin blitting. But the parameters allowed just affect the output translation.<br>
<br>Am I missing something?<br><br><br>--Matt