diff options
author | Carl Worth <cworth@cworth.org> | 2005-01-19 12:12:42 +0000 |
---|---|---|
committer | Carl Worth <cworth@cworth.org> | 2005-01-19 12:12:42 +0000 |
commit | 68d5ba661d5d0ba0a604a3c947f43f629a6a6bb9 (patch) | |
tree | ae1affc5f96f8cd1b8f70401fdd0efd26457afd6 /src/cairo-gstate.c | |
parent | 429c1f42b5942ebd8b3170e462418880c7cf5e2e (diff) |
Allow NULL values for return pointers so that the user can easily get partial results from cairo_matrix_get_affine, cairo_current_point, and cairo_current_color_rgb as needed.
Diffstat (limited to 'src/cairo-gstate.c')
-rw-r--r-- | src/cairo-gstate.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cairo-gstate.c b/src/cairo-gstate.c index 504ca620b..e855a7a66 100644 --- a/src/cairo-gstate.c +++ b/src/cairo-gstate.c @@ -1096,8 +1096,10 @@ _cairo_gstate_current_point (cairo_gstate_t *gstate, double *x_ret, double *y_re cairo_matrix_transform_point (&gstate->ctm_inverse, &x, &y); } - *x_ret = x; - *y_ret = y; + if (x_ret) + *x_ret = x; + if (y_ret) + *y_ret = y; return CAIRO_STATUS_SUCCESS; } |