void ddAbstractFigure::basicDrawSelected(wxBufferedDC& context, ddDrawingView *view){ ddRect copy = displayBox(); view->CalcScrolledPosition(copy.x,copy.y,©.x,©.y); context.SetPen(*wxRED_PEN); context.SetBrush(wxBrush (wxColour(133, 133, 133),wxSOLID)); context.DrawRectangle(copy); }
void TangramDlg::PaintTans(wxBufferedDC& dc){ for(int i=0;i<TANS_NO;i++){ if(tans[i] != NULL) { dc.SetPen(wxPen(wxColour(0,0,0), 3 )); dc.SetBrush(wxBrush(wxColour(255*i/8,50,25))); dc.DrawPolygon(tans[i]->GetSize(),tans[i]->GetPoints()); } } }
void hdAbstractFigure::basicDraw(wxBufferedDC &context, hdDrawingView *view) { hdRect copy = displayBox().gethdRect(view->getIdx()); view->CalcScrolledPosition(copy.x, copy.y, ©.x, ©.y); context.SetPen(*wxGREEN_PEN); context.SetBrush(wxBrush (wxColour(208, 208, 208), wxSOLID)); context.DrawRectangle(copy); }
void hdPolyLineFigure::basicDraw(wxBufferedDC &context, hdDrawingView *view) { int posIdx = view->getIdx(); if(points[posIdx]->count() < 2) { return; } hdPoint start, end; if(startTerminal) { startTerminal->setLinePen(linePen); start = startTerminal->draw(context, getStartPoint(posIdx), pointAt(posIdx, 1), view); } else { start = getStartPoint(posIdx); } if(endTerminal) { endTerminal->setLinePen(linePen); end = endTerminal->draw(context, getEndPoint(posIdx), pointAt(posIdx, pointCount(posIdx) - 2), view); } else { end = getEndPoint(posIdx); } context.SetPen(linePen); for(int i = 0; i < points[posIdx]->count() - 1; i++) { hdPoint *p1 = (hdPoint *) points[posIdx]->getItemAt(i); hdPoint *p2 = (hdPoint *) points[posIdx]->getItemAt(i + 1); hdPoint copyP1 = hdPoint (*p1); view->CalcScrolledPosition(copyP1.x, copyP1.y, ©P1.x, ©P1.y); hdPoint copyP2 = hdPoint (*p2); view->CalcScrolledPosition(copyP2.x, copyP2.y, ©P2.x, ©P2.y); context.DrawLine(copyP1, copyP2); } }
void hdLineAttribute::apply(wxBufferedDC &context) { context.SetPen(penAttributes); }
void ddIFigure::drawSelected (wxBufferedDC& context, ddDrawingView *view){ context.SetPen(defaultSelectedPen); context.SetBrush(defaultSelectedBrush); }