[cairo-bugs] [Bug 92044] Matrix operations offset draw on widget creation.

bugzilla-daemon at freedesktop.org bugzilla-daemon at freedesktop.org
Sun Sep 20 04:25:55 PDT 2015


https://bugs.freedesktop.org/show_bug.cgi?id=92044

Uli Schlachter <psychon at znc.in> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |NOTABUG

--- Comment #1 from Uli Schlachter <psychon at znc.in> ---
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.)

-- 
You are receiving this mail because:
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cairographics.org/archives/cairo-bugs/attachments/20150920/45c0545f/attachment.html>


More information about the cairo-bugs mailing list