add blend mode tests
[swfdec.git] / swfdec / swfdec_rect.h
blob9871321165b29df98bd78dbedf9e1130207fb5e7
1 /* Swfdec
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 <swfdec/swfdec_types.h>
26 #include <swfdec/swfdec_rectangle.h>
28 G_BEGIN_DECLS
30 struct _SwfdecRect
32 double x0;
33 double y0;
34 double x1;
35 double y1;
38 void swfdec_rect_init_empty (SwfdecRect *rect);
40 gboolean swfdec_rect_intersect (SwfdecRect * dest, const SwfdecRect * a, const SwfdecRect * b);
41 void swfdec_rect_round (SwfdecRect *dest, SwfdecRect *src);
42 void swfdec_rect_union (SwfdecRect * dest, const SwfdecRect * a, const SwfdecRect * b);
43 void swfdec_rect_subtract (SwfdecRect *dest, const SwfdecRect *a, const SwfdecRect *b);
44 void swfdec_rect_scale (SwfdecRect *dest, const SwfdecRect *src, double factor);
45 gboolean swfdec_rect_is_empty (const SwfdecRect * a);
46 /* FIXME: rename to _contains_point and _contains instead of _inside? */
47 gboolean swfdec_rect_contains (const SwfdecRect *rect, double x, double y);
48 gboolean swfdec_rect_inside (const SwfdecRect *outer, const SwfdecRect *inner);
49 void swfdec_rect_transform (SwfdecRect *dest, const SwfdecRect *src, const cairo_matrix_t *matrix);
51 void swfdec_rectangle_init_rect (SwfdecRectangle *rectangle, const SwfdecRect *rect);
53 G_END_DECLS
54 #endif