summaryrefslogtreecommitdiff
path: root/src/cairo.h
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-07-20 19:23:19 +0000
committerCarl Worth <cworth@cworth.org>2005-07-20 19:23:19 +0000
commit689fdfb6ea7460aec6283414a79bbf17a2d03eae (patch)
treeb124ae5f5c7566a4483956a96786d616079531e8 /src/cairo.h
parent88cf98fe334577fc3ecd84e179479b3b60f55c91 (diff)
Fix macro to not consider CAIRO_FORMAT_ARGB32 (==0) as a valid cairo_content_t.
Diffstat (limited to 'src/cairo.h')
-rw-r--r--src/cairo.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cairo.h b/src/cairo.h
index 41ae83ce7..d1bdc36bb 100644
--- a/src/cairo.h
+++ b/src/cairo.h
@@ -907,9 +907,11 @@ typedef enum _cairo_content {
CAIRO_CONTENT_COLOR_ALPHA = 0x3000
} cairo_content_t;
-#define CAIRO_CONTENT_VALID(content) (((content) & ~(CAIRO_CONTENT_COLOR | \
- CAIRO_CONTENT_ALPHA | \
- CAIRO_CONTENT_COLOR_ALPHA)) == 0)
+#define CAIRO_CONTENT_VALID(content) ((content) && \
+ (((content) & ~(CAIRO_CONTENT_COLOR | \
+ CAIRO_CONTENT_ALPHA | \
+ CAIRO_CONTENT_COLOR_ALPHA))\
+ == 0))
cairo_surface_t *
cairo_surface_create_similar (cairo_surface_t *other,