adding Offset to wxRegion / carbon
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30090 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -69,6 +69,9 @@ public:
|
|||||||
// Clear current region
|
// Clear current region
|
||||||
void Clear();
|
void Clear();
|
||||||
|
|
||||||
|
// Move the region
|
||||||
|
bool Offset(wxCoord x, wxCoord y);
|
||||||
|
|
||||||
// Union rectangle or region with this.
|
// Union rectangle or region with this.
|
||||||
bool Union(long x, long y, long width, long height)
|
bool Union(long x, long y, long width, long height)
|
||||||
{ return Combine(x, y, width, height, wxRGN_OR); }
|
{ return Combine(x, y, width, height, wxRGN_OR); }
|
||||||
|
@@ -128,6 +128,22 @@ void wxRegion::Clear()
|
|||||||
UnRef();
|
UnRef();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Move the region
|
||||||
|
bool wxRegion::Offset(wxCoord x, wxCoord y)
|
||||||
|
{
|
||||||
|
wxCHECK_MSG( M_REGION, false, _T("invalid wxRegion") );
|
||||||
|
|
||||||
|
if ( !x && !y )
|
||||||
|
{
|
||||||
|
// nothing to do
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
OffsetRgn( M_REGION , x , y ) ;
|
||||||
|
return true ;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//! Combine rectangle (x, y, w, h) with this.
|
//! Combine rectangle (x, y, w, h) with this.
|
||||||
bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op)
|
bool wxRegion::Combine(long x, long y, long width, long height, wxRegionOp op)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user