diff options
author | Carl Worth <cworth@cworth.org> | 2007-01-18 13:01:53 -0800 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2007-01-18 13:09:23 -0800 |
commit | 28d6a228f030dbec05ab5b0ba680db272df67c49 (patch) | |
tree | 00b063f0c3279b3f9e9d1757a461ea747c015b3a /test/get-and-set.c | |
parent | bc7072064e421e4c5e5043aada6cae1d8250938f (diff) | |
download | cairo-28d6a228f030dbec05ab5b0ba680db272df67c49.tar.gz |
Fix cairo_get_dash and cairo_get_dash_count APIs
Make these functions consistent with other cairo_get functions
by making cairo_get_dash_count return the count directly, and
removing the cairo_status_t return value from cairo_get_dash.
Diffstat (limited to 'test/get-and-set.c')
-rw-r--r-- | test/get-and-set.c | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/test/get-and-set.c b/test/get-and-set.c index ec35834fe..c23707e4c 100644 --- a/test/get-and-set.c +++ b/test/get-and-set.c @@ -93,6 +93,8 @@ settings_set (cairo_t *cr, settings_t *settings) static int settings_get (cairo_t *cr, settings_t *settings) { + int count; + settings->op = cairo_get_operator (cr); settings->tolerance = cairo_get_tolerance (cr); settings->fill_rule = cairo_get_fill_rule (cr); @@ -102,18 +104,11 @@ settings_get (cairo_t *cr, settings_t *settings) settings->miter_limit = cairo_get_miter_limit (cr); cairo_get_matrix (cr, &settings->matrix); - { - cairo_status_t status; - int count; - - status = cairo_get_dash_count (cr, &count); - if (status || count != 5) - return -1; + count = cairo_get_dash_count (cr); + if (count != 5) + return -1; - status = cairo_get_dash (cr, settings->dash, &settings->dash_offset); - if (status) - return -1; - } + cairo_get_dash (cr, settings->dash, &settings->dash_offset); return 0; } |