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:
@@ -97,6 +97,9 @@ class WXDLLIMPEXP_CORE wxBitmapHelpers
|
||||
public:
|
||||
// Create a new wxBitmap from the PNG data in the given buffer.
|
||||
static wxBitmap NewFromPNGData(const void* data, size_t size);
|
||||
|
||||
// Rescale the given bitmap to the requested size.
|
||||
static void Rescale(wxBitmap& bmp, const wxSize& sizeNeeded);
|
||||
};
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user