2 * Copyright (C) 2003-2006 David Schleef <ds@schleef.org>
3 * 2005-2006 Eric Anholt <eric@anholt.net>
4 * 2006 Benjamin Otte <otte@gnome.org>
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301 USA
22 #ifndef __SWFDEC_RECT_H__
23 #define __SWFDEC_RECT_H__
25 #include <libswfdec/swfdec_types.h>
26 #include <libswfdec/swfdec_rectangle.h>
36 void swfdec_rect_init_empty (SwfdecRect
*rect
);
38 gboolean
swfdec_rect_intersect (SwfdecRect
* dest
, const SwfdecRect
* a
, const SwfdecRect
* b
);
39 void swfdec_rect_round (SwfdecRect
*dest
, SwfdecRect
*src
);
40 void swfdec_rect_union (SwfdecRect
* dest
, const SwfdecRect
* a
, const SwfdecRect
* b
);
41 void swfdec_rect_subtract (SwfdecRect
*dest
, const SwfdecRect
*a
, const SwfdecRect
*b
);
42 void swfdec_rect_scale (SwfdecRect
*dest
, const SwfdecRect
*src
, double factor
);
43 gboolean
swfdec_rect_is_empty (const SwfdecRect
* a
);
44 /* FIXME: rename to _contains_point and _contains instead of _inside? */
45 gboolean
swfdec_rect_contains (const SwfdecRect
*rect
, double x
, double y
);
46 gboolean
swfdec_rect_inside (const SwfdecRect
*outer
, const SwfdecRect
*inner
);
47 void swfdec_rect_transform (SwfdecRect
*dest
, const SwfdecRect
*src
, const cairo_matrix_t
*matrix
);
49 void swfdec_rectangle_init_rect (SwfdecRectangle
*rectangle
, const SwfdecRect
*rect
);