[cairo] [PATCH v8 02/71] core: some helper macros for easier access to box dimensions
Enrico Weigelt, metux IT consult
enrico.weigelt at gr13.net
Thu Jun 30 15:45:40 UTC 2016
Signed-off-by: Enrico Weigelt, metux IT consult <enrico.weigelt at gr13.net>
---
src/cairo-box-inline.h | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/cairo-box-inline.h b/src/cairo-box-inline.h
index d6b9941..406102a 100644
--- a/src/cairo-box-inline.h
+++ b/src/cairo-box-inline.h
@@ -118,4 +118,7 @@ _cairo_box_is_pixel_aligned (const cairo_box_t *box)
#endif
}
+#define _CAIRO_BOX_WIDTH(box) (abs((box).p2.x-(box).p1.x))
+#define _CAIRO_BOX_HEIGHT(box) (abs((box).p2.y-(box).p1.y))
+
#endif /* CAIRO_BOX_H */
--
2.6.4.442.g545299f
More information about the cairo
mailing list