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:
@@ -184,10 +184,12 @@ public:
|
||||
void UseAlpha(bool use = true);
|
||||
void ResetAlpha() { UseAlpha(false); }
|
||||
|
||||
// provide stabs of scaled bitmaps functions, they are trivial here
|
||||
// allow setting and storing the scale factor
|
||||
virtual void SetScaleFactor(double scale);
|
||||
virtual double GetScaleFactor() const;
|
||||
|
||||
// but scaled metrics accessors return the same thing as non-scaled ones,
|
||||
// just as in all the other ports without wxHAS_DPI_INDEPENDENT_PIXELS.
|
||||
double GetScaledWidth() const;
|
||||
double GetScaledHeight() const;
|
||||
wxSize GetScaledSize() const;
|
||||
|
||||
Reference in New Issue
Block a user