Hello everyone<br><br>I think I&#39;ve found a bug in cairo-gstate.c, concerning the matrix transformation in the method _cairo_gstate_backend_to_user_rectangle, here is the current code :<br><br>&nbsp;&nbsp; cairo_matrix_t matrix_inverse;
<br><br>&nbsp;&nbsp;&nbsp; cairo_matrix_multiply (&amp;matrix_inverse, &amp;gstate-&gt;ctm_inverse,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;gstate-&gt;target-&gt;device_transform_inverse);<br>&nbsp;&nbsp;&nbsp; _cairo_matrix_transform_bounding_box (&amp;matrix_inverse,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; x1, y1, x2, y2, is_tight);<br><br><br>Shouldn&#39;t we first apply the device inverse transform before applying the CTM inverse? I&#39;m doing some work on a canvas based on libpapyrus, and I encountered a problem when I tried to draw on a GdkWindow (using gdk_cairo_create) embedded in a GtkScrolledWindow, and at the same time applying rotations and scaling on the CTM : the scrolled window moves the GdkWindow, thus the device transform is a translation on this window, and so the clipping region was not right, and eventually went outside of the visible region.
<br><br><br>Hope this helps.<br><br>Jonathan Gramain<br><br>