add the wxFont(const wxSize& pixelSize, ...) ctor to all ports; add some wxCHECK_MSGs to ensure that the wxSize objects contains non-negative arguments; document that passing zero for the width parameter is allowed; other minor doc fixes
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59564 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -565,11 +565,16 @@ void wxNativeFontInfo::SetPointSize(int pointsize)
|
||||
|
||||
void wxNativeFontInfo::SetPixelSize(const wxSize& pixelSize)
|
||||
{
|
||||
// NOTE: although the MSW port allows for negative pixel size heights,
|
||||
// other ports don't and since it's a very useful feature assert
|
||||
// here if we get a negative height:
|
||||
wxCHECK_RET( pixelSize.GetWidth() >= 0 && pixelSize.GetHeight() > 0,
|
||||
"Negative values for the pixel size or zero pixel height are not allowed" );
|
||||
|
||||
lf.lfHeight = pixelSize.GetHeight();
|
||||
lf.lfWidth = pixelSize.GetWidth();
|
||||
}
|
||||
|
||||
|
||||
void wxNativeFontInfo::SetStyle(wxFontStyle style)
|
||||
{
|
||||
switch ( style )
|
||||
|
||||
Reference in New Issue
Block a user