[cairo] [PATCH 07/71] core: some helper macros for easier access to box dimensions

Bryce Harrington bryce at osg.samsung.com
Mon Apr 24 22:55:14 UTC 2017


On Mon, Apr 17, 2017 at 06:56:46PM +0200, Enrico Weigelt, metux IT consult wrote:
> 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 59e5a0d5f..cea6eb8e5 100644
> --- a/src/cairo-box-inline.h
> +++ b/src/cairo-box-inline.h
> @@ -128,4 +128,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))
> +

Squash this patch with the first patch in your series that uses the macros.

>  #endif /* CAIRO_BOX_H */
> -- 
> 2.11.0.rc0.7.gbe5a750
> 
> -- 
> cairo mailing list
> cairo at cairographics.org
> https://lists.cairographics.org/mailman/listinfo/cairo


More information about the cairo mailing list