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:
@@ -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; }
|
||||
|
Reference in New Issue
Block a user