1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2025-07-23 07:14:22 +02:00

Use asynchronous tile rendering in ENC maps

This commit is contained in:
2022-11-06 15:26:28 +01:00
parent e1d1842fa6
commit b13bac3af9
4 changed files with 112 additions and 11 deletions

View File

@ -200,4 +200,6 @@ void RasterTile::render()
//painter.setPen(Qt::red);
//painter.setBrush(Qt::NoBrush);
//painter.drawRect(QRect(_rect.topLeft(), _pixmap.size()));
_valid = true;
}

View File

@ -18,11 +18,12 @@ public:
const QList<MapData::Poly*> &polygons, const QList<MapData::Point*> &points)
: _proj(proj), _transform(transform), _zoom(zoom), _rect(rect),
_ratio(ratio), _pixmap(rect.width() * ratio, rect.height() * ratio),
_lines(lines), _polygons(polygons), _points(points) {}
_lines(lines), _polygons(polygons), _points(points), _valid(false) {}
int zoom() const {return _zoom;}
QPoint xy() const {return _rect.topLeft();}
const QPixmap &pixmap() const {return _pixmap;}
bool isValid() const {return _valid;}
void render();
@ -48,6 +49,7 @@ private:
QList<MapData::Line*> _lines;
QList<MapData::Poly*> _polygons;
QList<MapData::Point*> _points;
bool _valid;
};
}