Factor out duplicated code for bitmap scaling in wxArtProvider.

Move duplicated code responsible for rescaling bitmaps in wxArtProvider to the
shared wxArtPrvider::RescaleBitmap() method.

Additionally, make this new method work even in wxUSE_IMAGE==0 case.

See #17071.

See https://github.com/wxWidgets/wxWidgets/pull/64.
This commit is contained in:
Artur Wieczorek
2015-08-07 23:40:40 +02:00
committed by Vadim Zeitlin
parent 09e8876c0c
commit 244ec264af
4 changed files with 29 additions and 11 deletions

View File

@@ -188,6 +188,9 @@ public:
// the topmost provider if platform_dependent = false
static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
// Rescale bitmap (used internally if requested size is other than the available).
static void RescaleBitmap(wxBitmap& bmp, const wxSize& sizeNeeded);
protected:
friend class wxArtProviderModule;
#if wxUSE_ARTPROVIDER_STD