#ifndef _WX_GTK_REGION_H_
#define _WX_GTK_REGION_H_
+#ifdef __WXGTK3__
+typedef struct _cairo_region cairo_region_t;
+#endif
+
// ----------------------------------------------------------------------------
// wxRegion
// ----------------------------------------------------------------------------
InitRect(rect.x, rect.y, rect.width, rect.height);
}
- wxRegion( size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE );
+ wxRegion( size_t n, const wxPoint *points,
+ wxPolygonFillMode fillStyle = wxODDEVEN_RULE );
+#if wxUSE_IMAGE
wxRegion( const wxBitmap& bmp)
{
Union(bmp);
{
Union(bmp, transColour, tolerance);
}
+#endif // wxUSE_IMAGE
virtual ~wxRegion();
virtual void Clear();
virtual bool IsEmpty() const;
-public:
- // Init with GdkRegion, set ref count to 2 so that
- // the C++ class will not destroy the region!
- wxRegion( GdkRegion *region );
-
+#ifdef __WXGTK3__
+ cairo_region_t* GetRegion() const;
+#else
+ wxRegion(const GdkRegion* region);
GdkRegion *GetRegion() const;
+#endif
protected:
- // ref counting code
- virtual wxObjectRefData *CreateRefData() const;
- virtual wxObjectRefData *CloneRefData(const wxObjectRefData *data) const;
+ virtual wxGDIRefData *CreateGDIRefData() const;
+ virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
// wxRegionBase pure virtuals
virtual bool DoIsEqual(const wxRegion& region) const;
void Init();
void CreateRects( const wxRegion& r );
- size_t m_current;
wxRegion m_region;
-
wxRect *m_rects;
- size_t m_numRects;
+ int m_numRects;
+ int m_current;
-private:
DECLARE_DYNAMIC_CLASS(wxRegionIterator)
};