Replace multiple RescaleBitmap() with wxBitmap::Rescale()
Define a single function and use it in both wxArtProvider and (the generic implementation of) wxSearchCtrl instead of repeating the same code elsewhere. Note that another, but slightly different, version of RescaleBitmap() still remains in wxPropertyGrid. Deprecate undocumented wxArtProvider::RescaleBitmap() which is completely useless now. No real changes, this is just a refactoring.
This commit is contained in:
@@ -682,6 +682,16 @@ public:
|
||||
*/
|
||||
static bool RemoveHandler(const wxString& name);
|
||||
|
||||
/**
|
||||
Rescale the given bitmap to the requested size.
|
||||
|
||||
This function uses wxImage::Rescale() to resize the given @a bmp to the
|
||||
requested size. Both the bitmap itself and size must be valid.
|
||||
|
||||
@since 3.1.6
|
||||
*/
|
||||
static void Rescale(wxBitmap& bmp, const wxSize& sizeNeeded);
|
||||
|
||||
/**
|
||||
Saves a bitmap in the named file.
|
||||
|
||||
|
Reference in New Issue
Block a user