Refactor float to int point size conversions once again

They will be also needed in wxFontInfo soon, so move them there and use
these functions from both wxFont and wxNativeFontInfo, as they can
depend on wxFontInfo but not the other way round.

No real changes.
This commit is contained in:
Vadim Zeitlin
2018-09-12 14:46:00 +02:00
parent 7500a999bd
commit 5a6b7681d8
3 changed files with 26 additions and 11 deletions

View File

@@ -578,7 +578,8 @@ bool wxFont::Create(int pointSize,
{
AccountForCompatValues(pointSize, style, weight);
return Create((float)pointSize, family, style, weight, underlined, faceName, encoding);
return Create(wxFontInfo::ToFloatPointSize(pointSize),
family, style, weight, underlined, faceName, encoding);
}
wxFont::~wxFont()