xref: /haiku/headers/private/interface/RegionSupport.h (revision 3cb015b1ee509d69c643506e8ff573808c86dcfc)
1 // This file is distributed under the OpenBeOS license
2 
3 #ifndef __REGION_SUPPORT_H
4 #define __REGION_SUPPORT_H
5 
6 #include <Region.h>
7 
8 class BRegion::Support {
9 public:
10 	static void ZeroRegion(BRegion &region);
11 	static void ClearRegion(BRegion &region);
12 	static void CopyRegion(const BRegion &source, BRegion &dest);
13 	static void AndRegion(const BRegion &first, const BRegion &second, BRegion &dest);
14 	static void OrRegion(const BRegion &first, const BRegion &second, BRegion &dest);
15 	static void SubRegion(const BRegion &first, const BRegion &second, BRegion &dest);
16 
17 private:
18 	static void CleanupRegion(BRegion &region);
19 	static void CleanupRegionVertical(BRegion &region);
20 	static void CleanupRegionHorizontal(BRegion &region);
21 
22 	static void SortRects(clipping_rect *rects, long count);
23 	static void SortTrans(long *lptr1, long *lptr2, long count);
24 
25 	static void CopyRegionMore(const BRegion &, BRegion &, long);
26 
27 	static void AndRegionComplex(const BRegion &, const BRegion &, BRegion &);
28 	static void AndRegion1ToN(const BRegion &, const BRegion &, BRegion &);
29 
30 	static void AppendRegion(const BRegion &, const BRegion &, BRegion &);
31 
32 	static void OrRegionComplex(const BRegion &, const BRegion &, BRegion &);
33 	static void OrRegion1ToN(const BRegion &, const BRegion &, BRegion &);
34 	static void OrRegionNoX(const BRegion &, const BRegion &, BRegion &);
35 	static void ROr(long, long, const BRegion &, const BRegion &,
36 					BRegion &, long *, long *);
37 
38 	static void SubRegionComplex(const BRegion &, const BRegion &, BRegion &);
39 	static void RSub(long, long, const BRegion &, const BRegion &,
40 					BRegion &, long *, long *);
41 };
42 
43 #endif // __REGION_SUPPORT_H
44