diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-01-22 16:11:48 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-01-22 23:01:52 +0000 |
commit | 9c98656fb1ac10a6085c5db5731b6b986af26165 (patch) | |
tree | 39eb769fde20f96645de2161b15f1927e7580a48 /src/cairo-color.c | |
parent | b7b65b5315836297f86c54121ea45e469f514312 (diff) | |
download | cairo-9c98656fb1ac10a6085c5db5731b6b986af26165.tar.gz |
color: Add enum value for the largest stock color.
Useful if we wish to keep a cache of patterns for the very common stock
colors...
Diffstat (limited to 'src/cairo-color.c')
-rw-r--r-- | src/cairo-color.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/cairo-color.c b/src/cairo-color.c index 7640bf436..255bd362b 100644 --- a/src/cairo-color.c +++ b/src/cairo-color.c @@ -67,13 +67,14 @@ _cairo_stock_color (cairo_stock_t stock) return &cairo_color_black; case CAIRO_STOCK_TRANSPARENT: return &cairo_color_transparent; - } - - ASSERT_NOT_REACHED; - /* If the user can get here somehow, give a color that indicates a - * problem. */ - return &cairo_color_magenta; + case CAIRO_STOCK_NUM_COLORS: + default: + ASSERT_NOT_REACHED; + /* If the user can get here somehow, give a color that indicates a + * problem. */ + return &cairo_color_magenta; + } } void |