diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-04 14:42:34 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-04 14:47:22 +0100 |
commit | 83759e7d592c5d7b12b2341574fd584fe5e0fb5a (patch) | |
tree | 02715905ff78f2070df45795bb35d92b74db9225 /src/cairo-gstate.c | |
parent | c0b1b178184ccfba0fe60c2a49901cadef9df36b (diff) | |
download | cairo-83759e7d592c5d7b12b2341574fd584fe5e0fb5a.tar.gz |
default-context: Convert the relative path segments into the backend coordinates
When transforming the incoming paths, the goal is to transform them from
user space onto the target coordinate system. Currently for relative
paths we used user_to_device_distance as we presumed that there was no
backend scale factor. However, Alex Larsson noticed that these then
broke when playing around with such a device transform...
Reported-by: Alexander Larsson <alexl@redhat.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-gstate.c')
-rw-r--r-- | src/cairo-gstate.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index 15dc46f6b..d62f0a405 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -814,6 +814,13 @@ _do_cairo_gstate_user_to_backend (cairo_gstate_t *gstate, double *x, double *y) } void +_do_cairo_gstate_user_to_backend_distance (cairo_gstate_t *gstate, double *x, double *y) +{ + cairo_matrix_transform_distance (&gstate->ctm, x, y); + cairo_matrix_transform_distance (&gstate->target->device_transform, x, y); +} + +void _do_cairo_gstate_backend_to_user (cairo_gstate_t *gstate, double *x, double *y) { cairo_matrix_transform_point (&gstate->target->device_transform_inverse, x, y); |