void GCDCGraphs::OnPaint(wxPaintEvent& e) { if (m_draws_wdg->GetSelectedDraw() == NULL) return; wxBufferedPaintDC pdc(this); wxGraphicsContext* dc = wxGraphicsContext::Create(pdc); dc->SetFont(GetFont(), *wxWHITE); RecalculateMargins(*dc); DrawBackground(*dc); dc->SetBrush(*wxWHITE_BRUSH); dc->SetPen(wxPen(wxColour(255, 255, 255, 255), 1, wxSOLID)); DrawXAxis(*dc); DrawXAxisVals(*dc); DrawYAxis(*dc); DrawYAxisVals(*dc); DrawUnit(*dc); DrawWindowInfo(*dc); DrawSeasonsLimitsInfo(*dc); if (m_draws_wdg->GetNoData() == true) DrawNoData(*dc); else DrawGraphs(*dc); DrawRemarksBitmaps(*dc); if (m_draw_param_name) DrawParamName(*dc); delete dc; }
void BackgroundView::DoDraw(wxDC *dc) { dc->Clear(); DrawBackground(dc); DrawSeasonLimits(dc); DrawTimeAxis(dc, 8, 4, 6); DrawYAxis(dc, 7, 5); DrawUnit(dc, 6, 8); DrawYAxisVals(dc, 4); DrawRemarksFlags(dc); }