* expose the XOR function for BRegions (for now called "ExclusiveInclude")

which already existed in the region backend ported from XOrg


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23394 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Stephan Aßmus 2008-01-11 13:42:21 +00:00
parent dc935a5aa9
commit 374b5544a9
2 changed files with 21 additions and 1 deletions

View File

@ -66,6 +66,8 @@ class BRegion {
void IntersectWith(const BRegion* region);
void ExclusiveInclude(const BRegion* region);
private:
friend class BDirectWindow;
friend class BPrivate::ServerLink;

View File

@ -414,7 +414,7 @@ BRegion::Exclude(const BRegion* region)
/*! \brief Modifies the region, so that it will contain just the area
in common with the given BRegion.
\param region the BRegion to intersect to.
\param region the BRegion to intersect with.
*/
void
BRegion::IntersectWith(const BRegion* region)
@ -429,6 +429,23 @@ BRegion::IntersectWith(const BRegion* region)
// #pragma mark -
/*! \brief Modifies the region, so that it will contain just the area
which both regions do not have in common.
\param region the BRegion to exclusively include.
*/
void
BRegion::ExclusiveInclude(const BRegion* region)
{
BRegion result;
Support::XXorRegion(this, region, &result);
_AdoptRegionData(result);
}
// #pragma mark -
/*! \brief Takes over the data of a region and marks that region empty.
\param region The region to adopt the data from.
*/
@ -501,6 +518,7 @@ BRegion::_SetSize(long newSize)
return true;
}
clipping_rect
BRegion::_Convert(const BRect& rect) const
{