Add wxBitmap::GetDIPSize() and use it in wxBitmapBundleImplArt
This fixes the problem with wrong standard bitmaps size when using high DPI for the main monitor with wxMSW, as GetScaledSize() used here since 31f2892200 (Avoid bitmap scaling in wxArtProvider::GetBitmapBundle(), 2021-12-17) was not the right function to use there. Closes #19331.
This commit is contained in:
@@ -541,6 +541,22 @@ public:
|
||||
*/
|
||||
virtual int GetDepth() const;
|
||||
|
||||
/**
|
||||
Returns the size of bitmap in DPI-independent units.
|
||||
|
||||
This assumes that the bitmap was created using the value of scale
|
||||
factor corresponding to the current DPI (see CreateScaled() and
|
||||
SetScaleFactor()) and returns its physical size divided by this scale
|
||||
factor.
|
||||
|
||||
Unlike GetScaledSize(), this function returns the same value under all
|
||||
platforms and so its result should @e not be used as window or device
|
||||
context coordinates.
|
||||
|
||||
@since 3.1.6
|
||||
*/
|
||||
wxSize GetDIPSize() const;
|
||||
|
||||
/**
|
||||
Returns the static list of bitmap format handlers.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user