Added a jamfile for NewRegionTest. Small changes
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15246 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -449,6 +449,22 @@ ClipRegion::_RecalculateBounds(const clipping_rect &rect)
|
||||
}
|
||||
|
||||
|
||||
int32
|
||||
ClipRegion::_FindSmallestBottom(const int32 &top, const int32 &startIndex) const
|
||||
{
|
||||
int32 bottom = kMaxVerticalExtent;
|
||||
for (int32 i = startIndex; i < fCount; i++) {
|
||||
const int32 n = fData[i].top - 1;
|
||||
if (n >= top && n < bottom)
|
||||
bottom = n;
|
||||
if (fData[i].bottom >= top && fData[i].bottom < bottom)
|
||||
bottom = fData[i].bottom;
|
||||
}
|
||||
|
||||
return bottom;
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
ClipRegion::_Append(const ClipRegion ®ion, const bool &aboveThis)
|
||||
{
|
||||
|
||||
@@ -17,13 +17,7 @@ public:
|
||||
~ClipRegion();
|
||||
|
||||
clipping_rect Frame() const { return fBound; }
|
||||
clipping_rect RectAt(const int32 &index) const
|
||||
{
|
||||
if (index >= 0 && index < fCount)
|
||||
return fData[index];
|
||||
clipping_rect rect = { 0, 0, -1, -1 };
|
||||
return rect;
|
||||
}
|
||||
clipping_rect RectAt(const int32 &index) const;
|
||||
|
||||
int32 CountRects() const { return fCount; }
|
||||
|
||||
@@ -75,9 +69,21 @@ private:
|
||||
void _AddRect(const clipping_rect &rect);
|
||||
void _RecalculateBounds(const clipping_rect &newRect);
|
||||
|
||||
int32 _FindSmallestBottom(const int32 &top, const int32 &startIndex) const;
|
||||
|
||||
void _Invalidate();
|
||||
bool _Resize(const int32 &newSize, const bool &keepOld = true);
|
||||
void _Adopt(ClipRegion ®ion);
|
||||
};
|
||||
|
||||
|
||||
inline clipping_rect
|
||||
ClipRegion::RectAt(const int32 &index) const
|
||||
{
|
||||
if (index >= 0 && index < fCount)
|
||||
return fData[index];
|
||||
clipping_rect rect = { 0, 0, -1, -1 };
|
||||
return rect;
|
||||
}
|
||||
|
||||
#endif // __CLIPREGION_H
|
||||
|
||||
@@ -45,10 +45,10 @@
|
||||
#include <new>
|
||||
|
||||
#include <Debug.h>
|
||||
#include <Region.h>
|
||||
#include "Region.h"
|
||||
|
||||
#include <clipping.h>
|
||||
#include <ClipRegion.h>
|
||||
#include "clipping.h"
|
||||
#include "ClipRegion.h"
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user