Fixed some bugs reported by Stephan. You were right after all :)
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@15237 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -267,13 +267,10 @@ ClipRegion::Exclude(const BRect &rect)
|
|||||||
void
|
void
|
||||||
ClipRegion::Exclude(const ClipRegion ®ion)
|
ClipRegion::Exclude(const ClipRegion ®ion)
|
||||||
{
|
{
|
||||||
if (fCount == 0)
|
if (fCount == 0 || region.fCount == 0 || !rects_intersect(fBound, region.fBound))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (region.fCount == 0 || !rects_intersect(fBound, region.fBound))
|
_ExcludeComplex(region);
|
||||||
*this = region;
|
|
||||||
else
|
|
||||||
_ExcludeComplex(region);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -296,7 +293,7 @@ ClipRegion::operator=(const ClipRegion ®ion)
|
|||||||
void
|
void
|
||||||
ClipRegion::_IntersectWithComplex(const ClipRegion ®ion)
|
ClipRegion::_IntersectWithComplex(const ClipRegion ®ion)
|
||||||
{
|
{
|
||||||
ClipRegion dest(*this);
|
ClipRegion dest;
|
||||||
|
|
||||||
for (int32 f = 0; f < fCount; f++) {
|
for (int32 f = 0; f < fCount; f++) {
|
||||||
for (int32 s = 0; s < region.fCount; s++) {
|
for (int32 s = 0; s < region.fCount; s++) {
|
||||||
|
|||||||
Reference in New Issue
Block a user