X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/77ffb5937e89927b621128789401db8921fe580f..7b4a652a8bf3da1b2dd20dd22c9e6db5dd03db59:/include/wx/mac/carbon/region.h diff --git a/include/wx/mac/carbon/region.h b/include/wx/mac/carbon/region.h index 7bfa096d09..33440ec1a6 100644 --- a/include/wx/mac/carbon/region.h +++ b/include/wx/mac/carbon/region.h @@ -6,7 +6,7 @@ // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWidgets licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_REGION_H_ @@ -37,17 +37,21 @@ wxRGN_XOR // Creates the union of two combined regions except for any }; class WXDLLEXPORT wxRegion : public wxGDIObject { -DECLARE_DYNAMIC_CLASS(wxRegion); +DECLARE_DYNAMIC_CLASS(wxRegion) friend class WXDLLEXPORT wxRegionIterator; public: wxRegion(long x, long y, long w, long h); wxRegion(const wxPoint& topLeft, const wxPoint& bottomRight); wxRegion(const wxRect& rect); wxRegion( WXHRGN hRegion ); + wxRegion(size_t n, const wxPoint *points, int fillStyle = wxODDEVEN_RULE ); wxRegion(); - wxRegion( const wxBitmap& bmp, - const wxColour& transColour = wxNullColour, - int tolerance = 0) + wxRegion(const wxBitmap& bmp) + { + Union(bmp); + } + wxRegion(const wxBitmap& bmp, + const wxColour& transColour, int tolerance = 0) { Union(bmp, transColour, tolerance); } @@ -65,6 +69,9 @@ public: // Clear current region void Clear(); + // Move the region + bool Offset(wxCoord x, wxCoord y); + // Union rectangle or region with this. bool Union(long x, long y, long width, long height) { return Combine(x, y, width, height, wxRGN_OR); } @@ -122,12 +129,13 @@ public: wxBitmap ConvertToBitmap() const; // Use the non-transparent pixels of a wxBitmap for the region to combine - // with this region. If the bitmap has a mask then it will be used, - // otherwise the colour to be treated as transparent may be specified, + // with this region. First version takes transparency from bitmap's mask, + // second lets the user specify the colour to be treated as transparent // along with an optional tolerance value. + // NOTE: implemented in common/rgncmn.cpp + bool Union(const wxBitmap& bmp); bool Union(const wxBitmap& bmp, - const wxColour& transColour = wxNullColour, - int tolerance = 0); + const wxColour& transColour, int tolerance = 0); // Internal bool Combine(long x, long y, long width, long height, wxRegionOp op);