[cairo] [PATCH 03/36] core: allow NULL parameter for _cairo_path_fixed_is_box()
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Sat Dec 12 10:51:31 PST 2015
Allow that function to be called with NULL parameter for the
return buffer, so we can use it for only checking whether
a path is a box, w/o actually returning the box dimensions.
This feature will be used in subsequent patches.
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
---
src/cairo-path-fixed.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/cairo-path-fixed.c b/src/cairo-path-fixed.c
index ac44bb7..df72b47 100644
--- a/src/cairo-path-fixed.c
+++ b/src/cairo-path-fixed.c
@@ -1295,7 +1295,8 @@ _cairo_path_fixed_is_box (const cairo_path_fixed_t *path,
buf = cairo_path_head (path);
if (_points_form_rect (buf->points)) {
- _canonical_box (box, &buf->points[0], &buf->points[2]);
+ if (box != NULL)
+ _canonical_box (box, &buf->points[0], &buf->points[2]);
return TRUE;
}
--
2.6.4.442.g545299f
More information about the cairo
mailing list