Re: [PATCH 01/72] core: some helper macros for easier access to box dimensions

Chris Wilson <[email protected]>
Newsgroups gmane.comp.lib.cairo
Message-ID <[email protected]>
On Tue, Dec 29, 2015 at 10:16:39AM +0100, Enrico Weigelt, metux IT consult wrote:
> Signed-off-by: Enrico Weigelt, metux IT consult <[email protected]>
> ---
>  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))

I seriously hope that all paths that may see non-canonical boxes handle
it without magic.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre
-- 
cairo mailing list
[email protected]
http://lists.cairographics.org/mailman/listinfo/cairo
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.