diff options
author | Anders Carlsson <andersca@luminoth.local> | 2006-04-11 01:07:33 +0200 |
---|---|---|
committer | Anders Carlsson <andersca@luminoth.local> | 2006-04-11 01:07:33 +0200 |
commit | 1e5f5aed07137d3a823c2d22e29eb0e53e359fef (patch) | |
tree | d13c0ef706575c15b1b50b6ac1638626b2ec9395 /src | |
parent | 3ed576522df8a4e41e856a500539ca3e6f69e2da (diff) |
Make the API more like Vlad's new API.#
Diffstat (limited to 'src')
-rw-r--r-- | src/cairo-quartz-private.h | 2 | ||||
-rw-r--r-- | src/cairo-quartz-surface.c | 11 | ||||
-rw-r--r-- | src/cairo-quartz.h | 4 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/cairo-quartz-private.h b/src/cairo-quartz-private.h index a57e0786..8b901352 100644 --- a/src/cairo-quartz-private.h +++ b/src/cairo-quartz-private.h @@ -44,7 +44,7 @@ typedef struct cairo_quartz_surface { CGContextRef context; - cairo_bool_t flipped; + cairo_bool_t y_grows_down; cairo_rectangle_t extents; diff --git a/src/cairo-quartz-surface.c b/src/cairo-quartz-surface.c index ed6a825e..e5b683ac 100644 --- a/src/cairo-quartz-surface.c +++ b/src/cairo-quartz-surface.c @@ -161,7 +161,7 @@ _cairo_quartz_surface_release_dest_image(void *abstract_surface, rect = CGRectMake (image_rect->x, image_rect->y, image_rect->width, image_rect->height); - if (surface->flipped) { + if (surface->y_grows_down) { CGContextSaveGState (surface->context); CGContextTranslateCTM (surface->context, 0, image_rect->height + 2 * image_rect->y); CGContextScaleCTM (surface->context, 1, -1); @@ -170,7 +170,7 @@ _cairo_quartz_surface_release_dest_image(void *abstract_surface, CGContextDrawImage(surface->context, rect, image_ref); CFRelease (image_ref); - if (surface->flipped) { + if (surface->y_grows_down) { CGContextRestoreGState (surface->context); } @@ -229,8 +229,9 @@ static const struct _cairo_surface_backend cairo_quartz_surface_backend = { cairo_surface_t *cairo_quartz_surface_create(CGContextRef context, - cairo_bool_t flipped, - int width, int height) + int width, + int height, + cairo_bool_t y_grows_down) { cairo_quartz_surface_t *surface; CGRect clip_box; @@ -245,7 +246,7 @@ cairo_surface_t *cairo_quartz_surface_create(CGContextRef context, surface->context = context; surface->clip_region = NULL; - surface->flipped = flipped; + surface->y_grows_down = y_grows_down; clip_box = CGContextGetClipBoundingBox (context); surface->extents.x = clip_box.origin.x; diff --git a/src/cairo-quartz.h b/src/cairo-quartz.h index 9ef537ed..b3072df7 100644 --- a/src/cairo-quartz.h +++ b/src/cairo-quartz.h @@ -47,9 +47,9 @@ CAIRO_BEGIN_DECLS cairo_public cairo_surface_t * cairo_quartz_surface_create (CGContextRef context, - cairo_bool_t flipped, int width, - int height); + int height, + cairo_bool_t y_grows_down); CAIRO_END_DECLS |