Add wxFontInfo::Style() for consistency with Weight()

This will also be useful when changing the existing code to use
wxFontInfo().
This commit is contained in:
Vadim Zeitlin
2018-09-12 23:16:29 +02:00
parent 11ab3b4786
commit c61fc16f96
2 changed files with 23 additions and 0 deletions

View File

@@ -164,6 +164,16 @@ public:
{ SetFlag(wxFONTFLAG_ITALIC, italic); return *this; }
wxFontInfo& Slant(bool slant = true)
{ SetFlag(wxFONTFLAG_SLANT, slant); return *this; }
wxFontInfo& Style(wxFontStyle style)
{
if ( style == wxFONTSTYLE_ITALIC )
return Italic();
if ( style == wxFONTSTYLE_SLANT )
return Slant();
return *this;
}
wxFontInfo& AntiAliased(bool antiAliased = true)
{ SetFlag(wxFONTFLAG_ANTIALIASED, antiAliased); return *this; }