2003-10-24 11:33:41 +04:00
|
|
|
// This file is distributed under the OpenBeOS license
|
|
|
|
|
|
|
|
#ifndef __REGION_SUPPORT_H
|
|
|
|
#define __REGION_SUPPORT_H
|
|
|
|
|
2005-06-05 05:15:26 +04:00
|
|
|
#include <Region.h>
|
|
|
|
|
2005-06-03 12:34:08 +04:00
|
|
|
class BRegion::Support {
|
2003-10-24 11:33:41 +04:00
|
|
|
public:
|
2005-06-03 12:34:08 +04:00
|
|
|
static void ZeroRegion(BRegion ®ion);
|
|
|
|
static void ClearRegion(BRegion ®ion);
|
|
|
|
static void CopyRegion(const BRegion &source, BRegion &dest);
|
|
|
|
static void AndRegion(const BRegion &first, const BRegion &second, BRegion &dest);
|
|
|
|
static void OrRegion(const BRegion &first, const BRegion &second, BRegion &dest);
|
|
|
|
static void SubRegion(const BRegion &first, const BRegion &second, BRegion &dest);
|
2003-10-24 11:33:41 +04:00
|
|
|
|
|
|
|
private:
|
2005-06-03 12:34:08 +04:00
|
|
|
static void CleanupRegion(BRegion ®ion);
|
|
|
|
static void CleanupRegionVertical(BRegion ®ion);
|
|
|
|
static void CleanupRegionHorizontal(BRegion ®ion);
|
2003-10-24 11:33:41 +04:00
|
|
|
|
|
|
|
static void SortRects(clipping_rect *rects, long count);
|
|
|
|
static void SortTrans(long *lptr1, long *lptr2, long count);
|
|
|
|
|
2005-06-03 12:34:08 +04:00
|
|
|
static void CopyRegionMore(const BRegion &, BRegion &, long);
|
2003-10-24 11:33:41 +04:00
|
|
|
|
2005-06-03 12:34:08 +04:00
|
|
|
static void AndRegionComplex(const BRegion &, const BRegion &, BRegion &);
|
|
|
|
static void AndRegion1ToN(const BRegion &, const BRegion &, BRegion &);
|
2003-10-24 11:33:41 +04:00
|
|
|
|
2005-06-03 12:34:08 +04:00
|
|
|
static void AppendRegion(const BRegion &, const BRegion &, BRegion &);
|
2003-10-24 11:33:41 +04:00
|
|
|
|
2005-06-03 12:34:08 +04:00
|
|
|
static void OrRegionComplex(const BRegion &, const BRegion &, BRegion &);
|
|
|
|
static void OrRegion1ToN(const BRegion &, const BRegion &, BRegion &);
|
|
|
|
static void OrRegionNoX(const BRegion &, const BRegion &, BRegion &);
|
|
|
|
static void ROr(long, long, const BRegion &, const BRegion &,
|
|
|
|
BRegion &, long *, long *);
|
2003-10-24 11:33:41 +04:00
|
|
|
|
2005-06-03 12:34:08 +04:00
|
|
|
static void SubRegionComplex(const BRegion &, const BRegion &, BRegion &);
|
|
|
|
static void RSub(long, long, const BRegion &, const BRegion &,
|
|
|
|
BRegion &, long *, long *);
|
2003-10-24 11:33:41 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // __REGION_SUPPORT_H
|