void FenetrePrincipale::DrawLignes(wxBufferedPaintDC &hdc) { wxBrush wt=*wxTRANSPARENT_BRUSH; hdc.SetBrush(wt); wxPen pActif(*wxBLACK, 3); wxPen pInactif(*wxBLACK, 1); for (int i=0;i<10;i++) if (feuille->Coupe(i)->GetWidth()!=0 || feuille->Coupe(i)->GetHeight()!=0) { wxPoint pTmp1(feuille->Coupe(i)->GetTopLeft()); wxPoint pTmp2(feuille->Coupe(i)->GetBottomRight()); if (i==feuille->IndiceCoupeSelec()) hdc.SetPen(pActif); else hdc.SetPen(pInactif); hdc.DrawLine(RepereImageEcran(pTmp1), RepereImageEcran(pTmp2)); } }
void FenetrePrincipale::DrawRectangles(wxBufferedPaintDC &hdc) { wxBrush wt=*wxTRANSPARENT_BRUSH; hdc.SetBrush(wt); hdc.SetLogicalFunction(wxXOR); hdc.SetPen(wxPen(*wxWHITE, 3)); for (int i=0;i<10;i++) if (feuille->Rectangle(i)->GetWidth()!=0 || feuille->Rectangle(i)->GetHeight()!=0) { hdc.DrawRectangle(RepereImageEcran(*feuille->Rectangle(i))); if (i==feuille->IndiceRectangleSelec()) { int fZoomNume,fZoomDeno; CalculZoom(fZoomNume,fZoomDeno); wxPoint pTmp(feuille->Rectangle(i)->GetTopLeft()); wxPoint p1(RepereImageEcran(pTmp)); wxRect rTrace(p1.x,p1.y,feuille->Rectangle(i)->width*fZoomNume/fZoomDeno,feuille->Rectangle(i)->height*fZoomNume/fZoomDeno); hdc.DrawLine(rTrace.GetBottomLeft(),rTrace.GetTopRight()); hdc.DrawLine(rTrace.GetTopLeft(),rTrace.GetBottomRight()); } } }