Only return really scaled bitmap size under platforms using DIPs
wxBitmap::GetScaledXXX() functions are useful for obtaining the
coordinates in logical pixels, so they should only divide by the scaling
factor on the platforms where logical pixels are actually different from
the physical ones, i.e. those using DPI-independent pixels.
This ensures that their behaviour under MSW remains unchanged even after
a1e4dca067 (Store scale factor in wxMSW bitmaps too, 2021-12-16), which
is the correct way to avoid breaking wxAUI (and other) drawing.
This commit is contained in:
@@ -190,6 +190,9 @@ public:
|
||||
virtual void SetScaleFactor(double scale);
|
||||
virtual double GetScaleFactor() const;
|
||||
|
||||
// These functions return the corresponding metrics divided by the scale
|
||||
// factor on platforms with DPI-independent pixels (e.g. GTK, Mac) and just
|
||||
// the same thing as the non-scaled accessors elsewhere (e.g. MSW).
|
||||
double GetScaledWidth() const;
|
||||
double GetScaledHeight() const;
|
||||
wxSize GetScaledSize() const;
|
||||
|
||||
Reference in New Issue
Block a user