Move scale factor-related functions to wxGDIImage from wxBitmap
This makes them available in wxIcon (and, less importantly, wxCursor) too which is needed in order to use icons correctly in high DPI. This is also more consistent with the other platforms, where wxIcon does have these methods. Document these methods in wxIcon now that they're available there under all platforms and also document wxIcon::GetSize() which had been available even before, but wasn't documented.
This commit is contained in:
@@ -191,19 +191,6 @@ public:
|
||||
void UseAlpha(bool use = true);
|
||||
void ResetAlpha() { UseAlpha(false); }
|
||||
|
||||
// allow setting and storing the scale factor
|
||||
virtual void SetScaleFactor(double scale);
|
||||
virtual double GetScaleFactor() const;
|
||||
|
||||
// return the size divided by scale factor
|
||||
wxSize GetDIPSize() 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 CreateWithLogicalSize() and GetLogicalXXX() functions
|
||||
bool CreateScaled(int w, int h, int d, double logicalScale)
|
||||
{ return CreateWithLogicalSize(wxSize(w, h), logicalScale, d); }
|
||||
|
||||
Reference in New Issue
Block a user