X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/3379ed3789e405f874d9db757d95346f1d378795..67e49a98bbba6793cf1e344477bee9e46d4d5c71:/src/gtk/region.cpp 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() { }