#include "wx/region.h"
#include "wx/gdicmn.h"
+#include "wx/mac/uma.h"
+#if !USE_SHARED_LIBRARY
IMPLEMENT_DYNAMIC_CLASS(wxRegion, wxGDIObject)
IMPLEMENT_DYNAMIC_CLASS(wxRegionIterator, wxObject)
+#endif
//-----------------------------------------------------------------------------
// wxRegionRefData implementation
wxRegion::wxRegion(WXHRGN hRegion )
{
m_refData = new wxRegionRefData;
- CopyRgn( hRegion , M_REGION ) ;
+ CopyRgn( (RgnHandle) hRegion , (RgnHandle) M_REGION ) ;
}
wxRegion::wxRegion(long x, long y, long w, long h)
{
m_refData = new wxRegionRefData;
- SetRectRgn( M_REGION , x , y , x+w , y+h ) ;
+ SetRectRgn( (RgnHandle) M_REGION , x , y , x+w , y+h ) ;
}
wxRegion::wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight)
{
m_refData = new wxRegionRefData;
- SetRectRgn( M_REGION , topLeft.x , topLeft.y , bottomRight.x , bottomRight.y ) ;
+ SetRectRgn( (RgnHandle) M_REGION , topLeft.x , topLeft.y , bottomRight.x , bottomRight.y ) ;
}
wxRegion::wxRegion(const wxRect& rect)
{
m_refData = new wxRegionRefData;
- SetRectRgn( M_REGION , rect.x , rect.y , rect.x+rect.width , rect.y+rect.height ) ;
+ SetRectRgn( (RgnHandle) M_REGION , rect.x , rect.y , rect.x+rect.width , rect.y+rect.height ) ;
}
/*!
//-----------------------------------------------------------------------------
// Outer bounds of region
-void wxRegion::GetBox(long& x, long& y, long&w, long &h) const
+void wxRegion::GetBox(wxCoord& x, wxCoord& y, wxCoord& w, wxCoord& h) const
{
if (m_refData)
{
- Rect box = (**M_REGION).rgnBBox ;
+ Rect box ;
+ GetRegionBounds( M_REGION , &box ) ;
x = box.left ;
y = box.top ;
w = box.right - box.left ;
wxRect wxRegion::GetBox() const
{
- long x, y, w, h;
+ wxCoord x, y, w, h;
GetBox(x, y, w, h);
return wxRect(x, y, w, h);
}
{
// we cannot dissolve it into rects on mac
m_rects = new wxRect[1];
- Rect rect = (**OTHER_M_REGION( region )).rgnBBox ;
+ Rect rect ;
+ GetRegionBounds( OTHER_M_REGION( region ) , &rect ) ;
m_rects[0].x = rect.left;
m_rects[0].y = rect.top;
m_rects[0].width = rect.right - rect.left;