X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8a16d7370e3cdc7d583a6f14ab11b3a1d27b73df..12b5f4b4d2d8a07962da7ba3b78c8c1ec2634a67:/src/mgl/region.cpp diff --git a/src/mgl/region.cpp b/src/mgl/region.cpp index f2778ffa99..6245737375 100644 --- a/src/mgl/region.cpp +++ b/src/mgl/region.cpp @@ -57,12 +57,12 @@ public: // wxRegion //----------------------------------------------------------------------------- -wxObjectRefData *wxRegion::CreateRefData() const +wxGDIRefData *wxRegion::CreateGDIRefData() const { return new wxRegionRefData; } -wxObjectRefData *wxRegion::CloneRefData(const wxObjectRefData *data) const +wxGDIRefData *wxRegion::CloneGDIRefData(const wxGDIRefData *data) const { return new wxRegionRefData(*(wxRegionRefData *)data); } @@ -102,6 +102,24 @@ wxRegion::wxRegion(const MGLRegion& region) M_REGION = region; } +wxRegion::wxRegion(size_t n, const wxPoint *points, int WXUNUSED(fillStyle)) +{ + m_refData = new wxRegionRefData; + point_t *pts = new point_t[n]; + + for (size_t i = 0; i < n; i++) + { + pts[i].x = points[i].x; + pts[i].y = points[i].y; + } + + region_t* rgn = MGL_rgnPolygon(n, pts, 1, 0, 0); + + M_REGION = rgn; + + delete [] pts; +} + wxRegion::~wxRegion() { // m_refData unrefed in ~wxObject @@ -127,7 +145,7 @@ void wxRegion::Clear() // Information on region //----------------------------------------------------------------------------- -bool wxRegion::DoIsEqual(const wxRegion& region) const +bool wxRegion::DoIsEqual(const wxRegion& WXUNUSED(region)) const { wxFAIL_MSG( _T("not implemented") );