]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/region.cpp
oops, fixed typo breaking iconv constness detection in the previous commit
[wxWidgets.git] / src / gtk / region.cpp
index 2c31667721a289500e07d11953029ee3461a2542..b89afd3b4ce9e686fecf7c75de49c929a9ed82e6 100644 (file)
@@ -186,6 +186,30 @@ wxRegion::wxRegion( const wxRect& rect )
 #endif
 }
 
 #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()
 {
 }
 wxRegion::~wxRegion()
 {
 }