Fix macro to not consider CAIRO_FORMAT_ARGB32 (==0) as a valid cairo_content_t.

This commit is contained in:
Carl Worth 2005-07-20 19:23:19 +00:00
parent 88cf98fe33
commit 689fdfb6ea
2 changed files with 12 additions and 3 deletions

View file

@ -1,3 +1,10 @@
2005-07-20 Carl Worth <cworth@cworth.org>
reviewed by: keithp
* src/cairo.h (CAIRO_CONTENT_VALID): Fix macro to not consider
CAIRO_FORMAT_ARGB32 (==0) as a valid cairo_content_t.
2005-07-20 Keith Packard <keithp@keithp.com>
reviewed by: otaylor

View file

@ -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,