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-private.h | |
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-private.h')
-rw-r--r-- | src/cairo-gstate-private.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/cairo-gstate-private.h b/src/cairo-gstate-private.h index 38f11c7ad..c95d94a25 100644 --- a/src/cairo-gstate-private.h +++ b/src/cairo-gstate-private.h @@ -209,6 +209,16 @@ _cairo_gstate_user_to_backend (cairo_gstate_t *gstate, double *x, double *y) } cairo_private void +_do_cairo_gstate_user_to_backend_distance (cairo_gstate_t *gstate, double *x, double *y); + +static inline void +_cairo_gstate_user_to_backend_distance (cairo_gstate_t *gstate, double *x, double *y) +{ + if (! gstate->is_identity) + _do_cairo_gstate_user_to_backend_distance (gstate, x, y); +} + +cairo_private void _do_cairo_gstate_backend_to_user (cairo_gstate_t *gstate, double *x, double *y); static inline void |