summaryrefslogtreecommitdiff
path: root/src/cairo-default-context.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-09-10 15:03:47 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2012-09-10 15:09:15 +0100
commitdf6780442feba5c0c9404353177f24913b58bd32 (patch)
treef1c481ce7929c7d54311a6e8fd31ddc0e6eb2426 /src/cairo-default-context.c
parentf864e2d70f53a1feeee5e32bf9724b1e544025a6 (diff)
context: Add missing functions to transform between user and backend coordinates
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.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/src/cairo-default-context.c b/src/cairo-default-context.c
index c020fcb1..3d828efc 100644
--- a/src/cairo-default-context.c
+++ b/src/cairo-default-context.c
@@ -621,6 +621,44 @@ _cairo_default_context_device_to_user_distance (void *abstract_cr,
_cairo_gstate_device_to_user_distance (cr->gstate, dx, dy);
}
+static void
+_cairo_default_context_backend_to_user (void *abstract_cr,
+ double *x,
+ double *y)
+{
+ cairo_default_context_t *cr = abstract_cr;
+
+ _cairo_gstate_backend_to_user (cr->gstate, x, y);
+}
+
+static void
+_cairo_default_context_backend_to_user_distance (void *abstract_cr, double *dx, double *dy)
+{
+ cairo_default_context_t *cr = abstract_cr;
+
+ _cairo_gstate_backend_to_user_distance (cr->gstate, dx, dy);
+}
+
+static void
+_cairo_default_context_user_to_backend (void *abstract_cr,
+ double *x,
+ double *y)
+{
+ cairo_default_context_t *cr = abstract_cr;
+
+ _cairo_gstate_user_to_backend (cr->gstate, x, y);
+}
+
+static void
+_cairo_default_context_user_to_backend_distance (void *abstract_cr,
+ double *dx,
+ double *dy)
+{
+ cairo_default_context_t *cr = abstract_cr;
+
+ _cairo_gstate_user_to_backend_distance (cr->gstate, dx, dy);
+}
+
/* Path constructor */
static cairo_status_t
@@ -1321,11 +1359,17 @@ static const cairo_backend_t _cairo_default_context_backend = {
_cairo_default_context_set_matrix,
_cairo_default_context_set_identity_matrix,
_cairo_default_context_get_matrix,
+
_cairo_default_context_user_to_device,
_cairo_default_context_user_to_device_distance,
_cairo_default_context_device_to_user,
_cairo_default_context_device_to_user_distance,
+ _cairo_default_context_user_to_backend,
+ _cairo_default_context_user_to_backend_distance,
+ _cairo_default_context_backend_to_user,
+ _cairo_default_context_backend_to_user_distance,
+
_cairo_default_context_new_path,
_cairo_default_context_new_sub_path,
_cairo_default_context_move_to,