+ // draw some text
+ wxString text("Text by wxGraphicsContext");
+ gc->SetFont( m_testFont, *wxBLACK );
+ gc->DrawText(text, 25.0, 60.0);
+
+ // draw rectangle around the text
+ double w, h, d, el;
+ gc->GetTextExtent(text, &w, &h, &d, &el);
+ gc->SetPen( *wxBLACK_PEN );
+ gc->DrawRectangle(25.0, 60.0, w, h);
+