mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-03 15:58:00 +02:00
path: Convert from backend coordinates back into user coordinates
Fixes regression from commit 83bfd85a13
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date: Fri Apr 23 19:45:26 2010 +0100
Implement cairo_backend_t
As there exists no public API to perform the operation we needed, and we
failed to create one, the constructed path failed to correctly remove
the device offset.
Fixes copy-path under device translation.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=54732
Reported-by: Benjamin Berg <benjamin@sipsolutions.net>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
df6780442f
commit
f34b87f6d7
1 changed files with 6 additions and 5 deletions
|
|
@ -37,6 +37,7 @@
|
|||
#include "cairoint.h"
|
||||
|
||||
#include "cairo-private.h"
|
||||
#include "cairo-backend-private.h"
|
||||
#include "cairo-error-private.h"
|
||||
#include "cairo-path-private.h"
|
||||
#include "cairo-path-fixed-private.h"
|
||||
|
|
@ -152,7 +153,7 @@ _cpp_move_to (void *closure,
|
|||
x = _cairo_fixed_to_double (point->x);
|
||||
y = _cairo_fixed_to_double (point->y);
|
||||
|
||||
cairo_device_to_user (cpp->cr, &x, &y);
|
||||
_cairo_backend_to_user (cpp->cr, &x, &y);
|
||||
|
||||
data->header.type = CAIRO_PATH_MOVE_TO;
|
||||
data->header.length = 2;
|
||||
|
|
@ -177,7 +178,7 @@ _cpp_line_to (void *closure,
|
|||
x = _cairo_fixed_to_double (point->x);
|
||||
y = _cairo_fixed_to_double (point->y);
|
||||
|
||||
cairo_device_to_user (cpp->cr, &x, &y);
|
||||
_cairo_backend_to_user (cpp->cr, &x, &y);
|
||||
|
||||
data->header.type = CAIRO_PATH_LINE_TO;
|
||||
data->header.length = 2;
|
||||
|
|
@ -205,15 +206,15 @@ _cpp_curve_to (void *closure,
|
|||
|
||||
x1 = _cairo_fixed_to_double (p1->x);
|
||||
y1 = _cairo_fixed_to_double (p1->y);
|
||||
cairo_device_to_user (cpp->cr, &x1, &y1);
|
||||
_cairo_backend_to_user (cpp->cr, &x1, &y1);
|
||||
|
||||
x2 = _cairo_fixed_to_double (p2->x);
|
||||
y2 = _cairo_fixed_to_double (p2->y);
|
||||
cairo_device_to_user (cpp->cr, &x2, &y2);
|
||||
_cairo_backend_to_user (cpp->cr, &x2, &y2);
|
||||
|
||||
x3 = _cairo_fixed_to_double (p3->x);
|
||||
y3 = _cairo_fixed_to_double (p3->y);
|
||||
cairo_device_to_user (cpp->cr, &x3, &y3);
|
||||
_cairo_backend_to_user (cpp->cr, &x3, &y3);
|
||||
|
||||
data->header.type = CAIRO_PATH_CURVE_TO;
|
||||
data->header.length = 4;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue