Don't use deprecated wxBOLD, wxNORMAL and similar constants.
Replace them with wxFONTWEIGHT_BOLD, wxFONTSTYLE_NORMAL or wxFONTWEIGHT_NORMAL and equivalents in the code of the library itself and in the samples. Also simplify font construction using wxFontInfo where possible to avoid specifying these constants at all if they are not needed. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@75590 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -774,7 +774,7 @@ void MyCanvas::DrawDefault(wxDC& dc)
|
||||
void MyCanvas::DrawText(wxDC& dc)
|
||||
{
|
||||
// set underlined font for testing
|
||||
dc.SetFont( wxFont(12, wxMODERN, wxNORMAL, wxNORMAL, true) );
|
||||
dc.SetFont( wxFontInfo(12).Family(wxFONTFAMILY_MODERN).Underlined() );
|
||||
dc.DrawText( wxT("This is text"), 110, 10 );
|
||||
dc.DrawRotatedText( wxT("That is text"), 20, 10, -45 );
|
||||
|
||||
@@ -791,7 +791,7 @@ void MyCanvas::DrawText(wxDC& dc)
|
||||
dc.DrawRotatedText(text , 400, 400, n);
|
||||
}
|
||||
|
||||
dc.SetFont( wxFont( 18, wxSWISS, wxNORMAL, wxNORMAL ) );
|
||||
dc.SetFont( wxFontInfo(18).Family(wxFONTFAMILY_SWISS) );
|
||||
|
||||
dc.DrawText( wxT("This is Swiss 18pt text."), 110, 40 );
|
||||
|
||||
@@ -1232,7 +1232,7 @@ void MyCanvas::DrawSplines(wxDC& dc)
|
||||
letters[m][n].y = center.y + h[ letters[m][n].y ];
|
||||
}
|
||||
|
||||
dc.SetPen( wxPen( *wxBLUE, 1, wxDOT) );
|
||||
dc.SetPen( wxPen( *wxBLUE, 1, wxPENSTYLE_DOT) );
|
||||
dc.DrawLines(5, letters[m]);
|
||||
dc.SetPen( wxPen( *wxBLACK, 4) );
|
||||
dc.DrawSpline(5, letters[m]);
|
||||
|
Reference in New Issue
Block a user