[cairo-commit] src/cairo-nquartz-surface.c
Vladimir Vukicevic
vladimir at kemper.freedesktop.org
Thu Sep 28 14:58:59 PDT 2006
src/cairo-nquartz-surface.c | 11 +++++++++--
1 files changed, 9 insertions(+), 2 deletions(-)
New commits:
diff-tree b05400b5590ab0303ef5802ac4952633e2b14d18 (from 17eeacfba844ea5f9592dff4621e6f721c27d6c5)
Author: Vladimir Vukicevic <vladimir at pobox.com>
Date: Thu Sep 28 14:58:49 2006 -0700
[nquartz] Return correct values from operation setup function
Leftovers from an old half-completed patch that was breaking the world.
This fixes the world, or at least one tiny part of it.
diff --git a/src/cairo-nquartz-surface.c b/src/cairo-nquartz-surface.c
index 9f87f8c..1c300b1 100644
--- a/src/cairo-nquartz-surface.c
+++ b/src/cairo-nquartz-surface.c
@@ -110,6 +110,7 @@ typedef struct cairo_nquartz_surface {
/* These are stored while drawing operations are in place, set up
* by nquartz_setup_source() and nquartz_finish_source()
*/
+ CGAffineTransform imageTransform;
CGImageRef sourceImage;
CGShadingRef sourceShading;
CGPatternRef sourcePattern;
@@ -663,6 +664,8 @@ _cairo_nquartz_setup_source (cairo_nquar
solid->color.green,
solid->color.blue,
solid->color.alpha);
+
+ return DO_SOLID;
} else if (source->type == CAIRO_PATTERN_TYPE_LINEAR ||
source->type == CAIRO_PATTERN_TYPE_RADIAL)
{
@@ -671,6 +674,8 @@ _cairo_nquartz_setup_source (cairo_nquar
return CAIRO_INT_STATUS_UNSUPPORTED;
surface->sourceShading = shading;
+
+ return DO_SHADING;
} else if (source->type == CAIRO_PATTERN_TYPE_SURFACE) {
CGPatternRef pattern = _cairo_nquartz_cairo_repeating_surface_pattern_to_quartz (surface, source);
if (!pattern)
@@ -695,11 +700,13 @@ _cairo_nquartz_setup_source (cairo_nquar
CGContextSetPatternPhase (surface->cgContext, CGSizeMake(0,0));
surface->sourcePattern = pattern;
+
+ return DO_PATTERN;
} else {
- return CAIRO_INT_STATUS_UNSUPPORTED;
+ return DO_UNSUPPORTED;
}
- return CAIRO_STATUS_SUCCESS;
+ ASSERT_NOT_REACHED;
}
static void
More information about the cairo-commit
mailing list