Fix compatibility breakage with wxMask::Create() in wxOSX (#1019)

Defining a Mac-specific Create(wxMemoryBuffer) overload hid the other
Create() overloads, which are actually part of the public API, so they
couldn't be used any longer since the changes of
e7d21f6638

Fix this by renaming this Create() to OSXCreate(), to avoid hiding the
base class methods.

Also remove Mac-specific ctor taking wxMemoryBuffer, this is confusing
and can be avoided by just calling OSXCreate() directly in the only
place where it is used.
This commit is contained in:
VZ
2018-11-09 17:52:58 +01:00
committed by Stefan Csomor
parent e484a2db19
commit cce9ef9d53
2 changed files with 9 additions and 17 deletions

View File

@@ -47,13 +47,8 @@ public:
// Construct a mask from a mono bitmap (black meaning show pixels, white meaning transparent)
wxMask(const wxBitmap& bitmap);
// implementation helper only : construct a mask from a 32 bit memory buffer
wxMask(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
virtual ~wxMask();
bool Create(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
wxBitmap GetBitmap() const;
// Implementation below
@@ -71,6 +66,9 @@ public:
WXHBITMAP GetHBITMAP() const ;
// implementation helper only : construct a mask from a 32 bit memory buffer
bool OSXCreate(const wxMemoryBuffer& buf, int width , int height , int bytesPerRow ) ;
protected:
// this function is called from Create() to free the existing mask data
virtual void FreeData() wxOVERRIDE;