Created attachment 118353 [details] Source files illustrating cairo matrix offset bug. When using cairo (version 1.14.3) in creating a widget, matrix use causes image to be offset within the cairo_t. This can be illustrated by drawing with/without an identity matrix. (Matrix is needed for image rotation on widget.) An example is attached. Define "USE_MATRIX" in the header file to turn on the error. Environment used: Debian 4.8.4-1, Linux version 3.16.0-4-amd64, gcc version 4.9.2
This works as documented. Try using things like cairo_rotate() instead of overwriting the matrix. At least try something like this: cairo_matrix_t matrix, identity_matrix; cairo_get_matrix(cr, &matrix); cairo_matrix_init_identity(&identity_matrix); // This makes no sense, but feel free to replace with a rotation cairo_matrix_multiply(&matrix, &matrix, &identity_matrix); cairo_set_matrix(cr, &matrix); (Technical detail: Gtk is giving you a cairo context onto a large surface and uses the matrix so that it appears to you as if the surface's (0, 0) were at the top-left corner of your widget. If you ignore the matrix, stuff breaks.)
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.