2009-09-12 Chris Toshok <toshok@ximian.com>
[moon.git] / src / region.h
blobdcfd8529edd5b2796d1b2b8eb61a3498b25c766a
1 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
2 /*
3 * region.h
5 * Copyright 2007 Novell, Inc. (http://www.novell.com)
7 * See the LICENSE file included with the distribution for details.
8 *
9 */
11 #ifndef __MOON_REGION_H__
12 #define __MOON_REGION_H__
14 #include <cairo.h>
15 #include <gdk/gdk.h> // for GdkRegion
16 #include "rect.h"
18 class Region {
19 GdkRegion *gdkregion;
21 public:
22 Region ();
23 Region (Rect rect);
24 Region (GdkRegion *region);
25 Region (Region *region);
26 Region (double x, double y, double width, double height);
28 ~Region ();
30 bool IsEmpty ();
32 void Union (Rect rect);
33 void Union (GdkRegion *region);
34 void Union (GdkRectangle *rect);
35 void Union (Region *region);
37 void Intersect (Region *region);
38 void Intersect (Rect rect);
40 void Subtract (Region *region);
41 void Subtract (Rect rect);
43 void GetRectangles (GdkRectangle **rects, int *count);
45 void Offset (int dx, int dy);
47 Rect ClipBox ();
48 GdkOverlapType RectIn (Rect rect);
50 void Draw (cairo_t *cr);
53 #endif /* __MOON_REGION_H__ */