source: trunk/third/libart_lgpl/art_rect.h @ 18256

Revision 18256, 2.2 KB checked in by ghudson, 22 years ago (diff)
This commit was generated by cvs2svn to compensate for changes in r18255, which included commits to RCS files with non-trunk default branches.
Line 
1/* Libart_LGPL - library of basic graphic primitives
2 * Copyright (C) 1998 Raph Levien
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Library General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12 * Library General Public License for more details.
13 *
14 * You should have received a copy of the GNU Library General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
18 */
19
20#ifndef __ART_RECT_H__
21#define __ART_RECT_H__
22
23#ifdef __cplusplus
24extern "C" {
25#endif
26
27typedef struct _ArtDRect ArtDRect;
28typedef struct _ArtIRect ArtIRect;
29
30struct _ArtDRect {
31  /*< public >*/
32  double x0, y0, x1, y1;
33};
34
35struct _ArtIRect {
36  /*< public >*/
37  int x0, y0, x1, y1;
38};
39
40/* Make a copy of the rectangle. */
41void art_irect_copy (ArtIRect *dest, const ArtIRect *src);
42
43/* Find the smallest rectangle that includes both source rectangles. */
44void art_irect_union (ArtIRect *dest,
45                      const ArtIRect *src1, const ArtIRect *src2);
46
47/* Return the intersection of the two rectangles */
48void art_irect_intersect (ArtIRect *dest,
49                          const ArtIRect *src1, const ArtIRect *src2);
50
51/* Return true if the rectangle is empty. */
52int art_irect_empty (const ArtIRect *src);
53
54/* Make a copy of the rectangle. */
55void art_drect_copy (ArtDRect *dest, const ArtDRect *src);
56
57/* Find the smallest rectangle that includes both source rectangles. */
58void art_drect_union (ArtDRect *dest,
59                      const ArtDRect *src1, const ArtDRect *src2);
60
61/* Return the intersection of the two rectangles */
62void art_drect_intersect (ArtDRect *dest,
63                          const ArtDRect *src1, const ArtDRect *src2);
64
65/* Return true if the rectangle is empty. */
66int art_drect_empty (const ArtDRect *src);
67
68void
69art_drect_affine_transform (ArtDRect *dst, const ArtDRect *src,
70                           const double matrix[6]);
71
72void art_drect_to_irect (ArtIRect *dst, ArtDRect *src);
73
74#ifdef __cplusplus
75}
76#endif
77
78#endif
Note: See TracBrowser for help on using the repository browser.