Add wxFont::SetFractionalPointSize()
Changing SetPointSize() argument type from int to float wasn't 100% backwards-compatible as it notably started resulting in warnings (from at least MSVC) about conversions from int to float in the existing code. To avoid these warnings and for symmetry with GetFractionalPointSize(), add SetFractionalPointSize() taking float argument and preserve the argument of type int in SetPointSize() for compatibility. SetPointSize() is now just a wrapper forwarding to the more general SetFractionalPointSize(). Notice that the other ports still remain broken, this commit only updates the currently working wxGTK, wxMac and wxMSW.
This commit is contained in:
@@ -96,7 +96,7 @@ public:
|
||||
virtual wxFontEncoding GetEncoding() const wxOVERRIDE;
|
||||
virtual const wxNativeFontInfo *GetNativeFontInfo() const wxOVERRIDE;
|
||||
|
||||
virtual void SetPointSize(float pointSize) wxOVERRIDE;
|
||||
virtual void SetFractionalPointSize(float pointSize) wxOVERRIDE;
|
||||
virtual void SetPixelSize(const wxSize& pixelSize) wxOVERRIDE;
|
||||
virtual void SetFamily(wxFontFamily family) wxOVERRIDE;
|
||||
virtual void SetStyle(wxFontStyle style) wxOVERRIDE;
|
||||
|
Reference in New Issue
Block a user