changed 3D rendering

added pan/zoom gesture
This commit is contained in:
2018-02-04 17:02:14 +01:00
parent 3b62f23c0e
commit 076c0e9157
32 changed files with 446 additions and 484 deletions

View File

@@ -67,25 +67,23 @@ public:
// the visible map-rect
const Rect r = p.getScaler().getMapVisible(w, h, step);
QRect rx(rs,0,w-1-rs,rs);
QRect rx(rs,0,w-0-rs,rs);
QRect ry(0,rs,rs,h-1-rs);
// background
{
// samller font
QFont f = p.p->font(); f.setPointSize(8);
p.p->setFont(f);
// outline
p.setPen(Qt::darkGray);
p.setBrush(QColor(240,240,240));
// x-axis
QLinearGradient gx(0,0,0,rs); gx.setColorAt(0, c1); gx.setColorAt(1, c2); p.setBrush(gx);
//QLinearGradient gx(0,0,0,rs); gx.setColorAt(0, c1); gx.setColorAt(1, c2); p.setBrush(gx);
p.p->drawRect(rx);
// y-axis
QLinearGradient gy(0,0,rs,0); gy.setColorAt(0, c2); gy.setColorAt(1, c1); p.setBrush(gy);
//QLinearGradient gy(0,0,rs,0); gy.setColorAt(0, c2); gy.setColorAt(1, c1); p.setBrush(gy);
p.p->drawRect(ry);
}
@@ -101,6 +99,10 @@ public:
p.setPenBrush(Qt::black, Qt::NoBrush);
char buf[128];
// samller font
QFont f = p.p->font(); f.setPointSize(8);
p.p->setFont(f);
// coordinates
QRect ru(0,0,rs-1,rs-1);
p.p->fillRect(ru, Qt::white);