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::DrawTextTransparent(PRectangle rc, Font &font, XYPOSITION ybase, const char *s, int len, ColourDesired fore) { SetFont(font); PenColour(fore); GetPainter()->setBackgroundMode(Qt::TransparentMode); QString su = codec->toUnicode(s, len); GetPainter()->drawText(QPointF(rc.left, ybase), su); }
void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font, XYPOSITION ybase, const char *s, int len, ColourDesired fore, ColourDesired back) { SetFont(font); PenColour(fore); GetPainter()->setBackground(QColorFromCA(back)); GetPainter()->setBackgroundMode(Qt::OpaqueMode); QString su = codec->toUnicode(s, len); GetPainter()->drawText(QPointF(rc.left, ybase), su); }
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::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::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)); }