added ctor taking wxFontFlags

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17669 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-11-02 23:58:52 +00:00
parent 7bfbbc0efb
commit 01cb1c2617
3 changed files with 94 additions and 0 deletions

View File

@@ -77,6 +77,33 @@ wxFont *wxFontBase::New(int size,
return new wxFont(size, family, style, weight, underlined, face, encoding);
}
/* static */
wxFont *wxFontBase::New(int pointSize,
wxFontFamily family,
int flags,
const wxString& face,
wxFontEncoding encoding)
{
return New
(
pointSize,
family,
flags & wxFONTFLAG_ITALIC
? wxFONTSTYLE_ITALIC
: flags & wxFONTFLAG_SLANT
? wxFONTSTYLE_SLANT
: wxFONTSTYLE_NORMAL,
flags & wxFONTFLAG_LIGHT
? wxFONTWEIGHT_LIGHT
: flags & wxFONTFLAG_BOLD
? wxFONTWEIGHT_BOLD
: wxFONTWEIGHT_NORMAL,
(flags & wxFONTFLAG_UNDERLINED) != 0,
face,
encoding
);
}
/* static */
wxFont *wxFontBase::New(const wxNativeFontInfo& info)
{