[cairo-commit] src/cairo-gstate.c
Behdad Esfahbod
behdad at kemper.freedesktop.org
Wed Sep 12 14:45:40 PDT 2007
src/cairo-gstate.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
New commits:
diff-tree 5eae45c55b3cd240945cd225631c9c782f69b50f (from f2910ad3e9bfd279af7f9f43013489a32b5c1747)
Author: Jonathan Gramain <jonathan.gramain at gmail.com>
Date: Wed Sep 12 17:43:55 2007 -0400
[cairo-gstate] Fix order of matrices in _cairo_gstate_backend_to_user_rectangle()
The cairo_matrix_multiply(out,a,b) docs say that it is equivalent to applying
matrix a first, followed by b. Looking at _cairo_gstate_backend_to_user() we should
apply device_transform_inverse followed by ctm_inverse. That's what we do now.
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c
index 4c27567..3eb206a 100644
--- a/src/cairo-gstate.c
+++ b/src/cairo-gstate.c
@@ -747,8 +747,9 @@ _cairo_gstate_backend_to_user_rectangle
{
cairo_matrix_t matrix_inverse;
- cairo_matrix_multiply (&matrix_inverse, &gstate->ctm_inverse,
- &gstate->target->device_transform_inverse);
+ cairo_matrix_multiply (&matrix_inverse,
+ &gstate->target->device_transform_inverse,
+ &gstate->ctm_inverse);
_cairo_matrix_transform_bounding_box (&matrix_inverse,
x1, y1, x2, y2, is_tight);
}
More information about the cairo-commit
mailing list