void SurfaceImpl::Ellipse(PRectangle rc, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); GetPainter()->drawEllipse(QRectFromPRect(rc)); }
void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); QRect rect = QRect(rc.left, rc.top, rc.Width() - 1, rc.Height() - 1); GetPainter()->drawRect(rect); }
void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); wxPoint *p = new wxPoint[npts]; for (int i=0; i<npts; i++) { p[i].x = pts[i].x; p[i].y = pts[i].y; } hdc->DrawPolygon(npts, p); delete [] p; }
void SurfaceImpl::Polygon(Point *pts, int npts, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); QPoint *qpts = new QPoint[npts]; for (int i = 0; i < npts; i++) { qpts[i] = QPoint(pts[i].x, pts[i].y); } GetPainter()->drawPolygon(qpts, npts); delete [] qpts; }
void SurfaceImpl::FillRectangle(PRectangle rc, ColourDesired back) { BrushColour(back); GetPainter()->setPen(Qt::NoPen); GetPainter()->drawRect(QRectFromPRect(rc)); }
void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) { PenColour(fore); BrushColour(back); hdc->DrawEllipse(wxRectFromPRectangle(rc)); }
void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back) { PenColour(fore); BrushColour(back); hdc->DrawRoundedRectangle(wxRectFromPRectangle(rc), 4); }
void SurfaceImpl::FillRectangle(PRectangle rc, ColourAllocated back) { BrushColour(back); hdc->SetPen(*wxTRANSPARENT_PEN); hdc->DrawRectangle(wxRectFromPRectangle(rc)); }
void SurfaceImpl::Polygon(Point *pts, int npts, ColourAllocated fore, ColourAllocated back) { PenColour(fore); BrushColour(back); hdc->DrawPolygon(npts, (wxPoint*)pts); }
void SurfaceImpl::RectangleDraw(PRectangle rc, ColourDesired fore, ColourDesired back) { PenColour(fore); BrushColour(back); hdc->DrawRectangle(wxRectFromPRectangle(rc)); }