1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| wxPaintDC pdc(this);
wxDC &dc = (wxDC&) pdc ;
PrepareDC(dc);
wxPen pen(wxT("GREY"), 0.1, wxSOLID);
dc.SetPen(pen);
wxFont font(2, wxSWISS , wxNORMAL, wxNORMAL, false, _("Arial Black"));
dc.SetFont(font);
dc.SetTextBackground(*wxWHITE);
dc.SetTextForeground(*wxBLACK);
dc.SetMapMode(wxMM_METRIC);
// affiche graduations
for (int i=0; i<=270; i+=10)
{
dc.DrawRotatedText(wxString::Format(wxT("%d"),i),i+10,7, 45);
dc.DrawLine(i+10,7,i+10,9);
}
for (int i=0; i<=300; i+=10)
{
dc.DrawText(wxString::Format(wxT("%d"),i),1,i+8);
dc.DrawLine(7,i+10,9,i+10);
} |
Partager