X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3379ed3789e405f874d9db757d95346f1d378795..e4315700228573d42a9afb1498fec4ee7b95ccb0:/src/gtk/region.cpp?ds=sidebyside diff --git a/src/gtk/region.cpp b/src/gtk/region.cpp index 2c31667721..b89afd3b4c 100644 --- a/src/gtk/region.cpp +++ b/src/gtk/region.cpp @@ -186,6 +186,30 @@ wxRegion::wxRegion( const wxRect& rect ) #endif } +wxRegion::wxRegion( size_t n, const wxPoint *points, int fillStyle ) +{ + GdkPoint *gdkpoints = new GdkPoint[n]; + for ( size_t i = 0 ; i < n ; i++ ) + { + gdkpoints[i].x = points[i].x; + gdkpoints[i].y = points[i].y; + } + + m_refData = new wxRegionRefData(); + + GdkRegion* reg = gdk_region_polygon + ( + gdkpoints, + n, + fillStyle == wxWINDING_RULE ? GDK_WINDING_RULE + : GDK_EVEN_ODD_RULE + ); + + M_REGIONDATA->m_region = reg; + + delete [] gdkpoints; +} + wxRegion::~wxRegion() { }