#include "wx/window.h"
#include "wx/msw/private.h"
- IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
- IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject)
+IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
+IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject)
//-----------------------------------------------------------------------------
// wxRegionRefData implementation
// Outer bounds of region
void wxRegion::GetBox(wxCoord& x, wxCoord& y, wxCoord&w, wxCoord &h) const
{
- if (m_refData) {
+ if (m_refData)
+ {
RECT rect;
::GetRgnBox(M_REGION, & rect);
x = rect.left;
y = rect.top;
w = rect.right - rect.left;
h = rect.bottom - rect.top;
- } else {
+ }
+ else
+ {
x = y = w = h = 0;
}
}
// Is region empty?
bool wxRegion::Empty() const
{
- if (M_REGION == 0)
- return TRUE;
wxCoord x, y, w, h;
GetBox(x, y, w, h);
- return ((w == 0) && (h == 0));
+ return (w == 0) && (h == 0);
}
//-----------------------------------------------------------------------------