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:
Vadim Zeitlin
2021-09-23 22:46:53 +01:00
parent 46314bd6b1
commit 024c231624
7 changed files with 52 additions and 55 deletions

View File

@@ -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);
};