[cairo] [API] Export region data type

Kristian Høgsberg krh at bitplanet.net
Sat Feb 21 07:02:52 PST 2009


On Sat, Feb 21, 2009 at 9:44 AM, Soeren Sandmann <sandmann at daimi.au.dk> wrote:
> Hi,
>
> I'd like to propose exporting the region data type for 1.10. There is
> an implementation available in the public-region branch of this
> repository:
...
>    typedef struct _cairo_rectangle_int {
>        int x, y;
>        unsigned int width, height;
>    } cairo_rectangle_int_t;

If we end up exporting this, I'd suggest making width and height
signed ints to avoid overflow pitfalls such as

  if (rect1->x - rect2->x < rect3->width)

cheers,
Kristian


More information about the cairo mailing list