Make text drawn by wxGraphicsContext slightly less intrusive
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64298 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -254,14 +254,14 @@ void MyApp::Draw(wxDC&dc)
|
|||||||
|
|
||||||
// draw some text
|
// draw some text
|
||||||
wxString text("Text by wxGraphicsContext");
|
wxString text("Text by wxGraphicsContext");
|
||||||
gc->SetFont( m_testFont, *wxBLUE );
|
gc->SetFont( m_testFont, *wxBLACK );
|
||||||
gc->DrawText(text, 50.0, 50.0);
|
gc->DrawText(text, 25.0, 60.0);
|
||||||
|
|
||||||
// draw rectangle around the text
|
// draw rectangle around the text
|
||||||
double w, h, d, el;
|
double w, h, d, el;
|
||||||
gc->GetTextExtent(text, &w, &h, &d, &el);
|
gc->GetTextExtent(text, &w, &h, &d, &el);
|
||||||
gc->SetPen( *wxBLUE_PEN );
|
gc->SetPen( *wxBLACK_PEN );
|
||||||
gc->DrawRectangle(50.0, 50.0, w, h);
|
gc->DrawRectangle(25.0, 60.0, w, h);
|
||||||
|
|
||||||
delete gc;
|
delete gc;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user