Deprecate wxBitmap::SetWidth/Height/Size/Depth, wxIcon::SetSize functions
wxBitmap and wxIcon dimensions and colour depth are determined during creation so using all these functions could lead to inconsistencies.
This commit is contained in:
@@ -118,16 +118,14 @@ public:
|
||||
wxSize(GetGDIImageData()->m_width, GetGDIImageData()->m_height);
|
||||
}
|
||||
|
||||
void SetWidth(int w) { AllocExclusive(); GetGDIImageData()->m_width = w; }
|
||||
void SetHeight(int h) { AllocExclusive(); GetGDIImageData()->m_height = h; }
|
||||
void SetDepth(int d) { AllocExclusive(); GetGDIImageData()->m_depth = d; }
|
||||
#if WXWIN_COMPATIBILITY_3_0
|
||||
wxDEPRECATED_INLINE(void SetWidth(int w), AllocExclusive(); GetGDIImageData()->m_width = w; )
|
||||
wxDEPRECATED_INLINE(void SetHeight(int h), AllocExclusive(); GetGDIImageData()->m_height = h; )
|
||||
wxDEPRECATED_INLINE(void SetDepth(int d), AllocExclusive(); GetGDIImageData()->m_depth = d; )
|
||||
|
||||
void SetSize(int w, int h)
|
||||
{
|
||||
AllocExclusive();
|
||||
GetGDIImageData()->SetSize(w, h);
|
||||
}
|
||||
void SetSize(const wxSize& size) { SetSize(size.x, size.y); }
|
||||
wxDEPRECATED_INLINE(void SetSize(int w, int h), AllocExclusive(); GetGDIImageData()->SetSize(w, h); )
|
||||
wxDEPRECATED_INLINE(void SetSize(const wxSize& size), AllocExclusive(); GetGDIImageData()->SetSize(size.x, size.y); )
|
||||
#endif // WXWIN_COMPATIBILITY_3_0
|
||||
|
||||
// forward some of base class virtuals to wxGDIImageRefData
|
||||
bool FreeResource(bool force = false) wxOVERRIDE;
|
||||
|
Reference in New Issue
Block a user