X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/bbcc2d1b1c02b21784baf2c7d98c14c7439bb260..1a8e8d694bdcaec228f59a55f2aca1dfea0679db:/src/mgl/region.cpp diff --git a/src/mgl/region.cpp b/src/mgl/region.cpp index 1211a7a954..2604513a1e 100644 --- a/src/mgl/region.cpp +++ b/src/mgl/region.cpp @@ -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