Add wxBitmap::GetLogical{Width,Height,Size}()

These functions have better names than the existing GetScaledXXX() ones,
so add them to be able to use them in the new code, even if we still
keep the old ones for compatibility.
This commit is contained in:
Vadim Zeitlin
2022-01-22 18:56:21 +00:00
parent 1ae0037330
commit 65bb454311
6 changed files with 96 additions and 51 deletions

View File

@@ -191,11 +191,16 @@ public:
// return the size divided by scale factor
wxSize GetDIPSize() 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;
// logical metrics accessors return the same thing as physical ones, just
// as in all the other ports without wxHAS_DPI_INDEPENDENT_PIXELS.
double GetLogicalWidth() const;
double GetLogicalHeight() const;
wxSize GetLogicalSize() const;
// old synonyms for GetLogicalXXX() functions
double GetScaledWidth() const { return GetLogicalWidth(); }
double GetScaledHeight() const { return GetLogicalHeight(); }
wxSize GetScaledSize() const { return GetLogicalSize(); }
// implementation only from now on
// -------------------------------