Simplify wxBitmap::GetScaledXXX() in wxMSW

The scale factor is always 1 in this port, so don't bother dividing or
rounding by it.
This commit is contained in:
Vadim Zeitlin
2021-10-23 20:24:52 +01:00
parent b258d02be3
commit c8f76dea8e

View File

@@ -187,10 +187,9 @@ public:
// support for scaled bitmaps
virtual double GetScaleFactor() const { return 1.0; }
virtual double GetScaledWidth() const { return GetWidth() / GetScaleFactor(); }
virtual double GetScaledHeight() const { return GetHeight() / GetScaleFactor(); }
virtual wxSize GetScaledSize() const
{ return wxSize(wxRound(GetScaledWidth()), wxRound(GetScaledHeight())); }
virtual double GetScaledWidth() const { return GetWidth(); }
virtual double GetScaledHeight() const { return GetHeight(); }
virtual wxSize GetScaledSize() const { return GetSize(); }
// implementation only from now on
// -------------------------------