Fix storing wxBitmap data in GdkPixbuf
Under wxGTK+2 bitmap data with mask and without it (raw) should be stored in the separate GdkPixbuf buffers - just like it's done in wxGTK+3. These two buffers are necessary because only GdkPixbuf with raw bitmap data (original, non-masked) should be copied when wxBitmapRefData instance is cloned e.g. in SetMask(). GdkPixbuf with masked data is not copied and is created on first use in wxBitmap::GetPixbuf(). Closes #18508. See #18498.
This commit is contained in:
@@ -133,7 +133,6 @@ public:
|
||||
#endif
|
||||
|
||||
#ifdef __WXGTK3__
|
||||
GdkPixbuf* GetPixbufNoMask() const;
|
||||
cairo_t* CairoCreate() const;
|
||||
void Draw(cairo_t* cr, int x, int y, bool useMask = true, const wxColour* fg = NULL, const wxColour* bg = NULL) const;
|
||||
void SetSourceSurface(cairo_t* cr, int x, int y, const wxColour* fg = NULL, const wxColour* bg = NULL) const;
|
||||
@@ -143,6 +142,7 @@ public:
|
||||
bool HasPixbuf() const;
|
||||
wxBitmap(GdkPixmap* pixmap);
|
||||
#endif
|
||||
GdkPixbuf* GetPixbufNoMask() const;
|
||||
GdkPixbuf *GetPixbuf() const;
|
||||
|
||||
// raw bitmap access support functions
|
||||
|
Reference in New Issue
Block a user