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-default-context.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-default-context.c')
-rw-r--r-- | src/cairo-default-context.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/cairo-default-context.c b/src/cairo-default-context.c index dc8c359a9..c020fcb1f 100644 --- a/src/cairo-default-context.c +++ b/src/cairo-default-context.c @@ -748,7 +748,7 @@ _cairo_default_context_rel_move_to (void *abstract_cr, double dx, double dy) cairo_default_context_t *cr = abstract_cr; cairo_fixed_t dx_fixed, dy_fixed; - _cairo_gstate_user_to_device_distance (cr->gstate, &dx, &dy); + _cairo_gstate_user_to_backend_distance (cr->gstate, &dx, &dy); dx_fixed = _cairo_fixed_from_double (dx); dy_fixed = _cairo_fixed_from_double (dy); @@ -762,7 +762,7 @@ _cairo_default_context_rel_line_to (void *abstract_cr, double dx, double dy) cairo_default_context_t *cr = abstract_cr; cairo_fixed_t dx_fixed, dy_fixed; - _cairo_gstate_user_to_device_distance (cr->gstate, &dx, &dy); + _cairo_gstate_user_to_backend_distance (cr->gstate, &dx, &dy); dx_fixed = _cairo_fixed_from_double (dx); dy_fixed = _cairo_fixed_from_double (dy); @@ -782,9 +782,9 @@ _cairo_default_context_rel_curve_to (void *abstract_cr, cairo_fixed_t dx2_fixed, dy2_fixed; cairo_fixed_t dx3_fixed, dy3_fixed; - _cairo_gstate_user_to_device_distance (cr->gstate, &dx1, &dy1); - _cairo_gstate_user_to_device_distance (cr->gstate, &dx2, &dy2); - _cairo_gstate_user_to_device_distance (cr->gstate, &dx3, &dy3); + _cairo_gstate_user_to_backend_distance (cr->gstate, &dx1, &dy1); + _cairo_gstate_user_to_backend_distance (cr->gstate, &dx2, &dy2); + _cairo_gstate_user_to_backend_distance (cr->gstate, &dx3, &dy3); dx1_fixed = _cairo_fixed_from_double (dx1); dy1_fixed = _cairo_fixed_from_double (dy1); |