1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-11-28 05:34:47 +01:00

Optimization

This commit is contained in:
Martin Tůma 2023-05-26 21:30:27 +02:00
parent c6c3e0978c
commit d6d43baec5

View File

@ -129,9 +129,10 @@ QPainterPath RasterTile::painterPath(const Polygon &polygon) const
for (int i = 0; i < polygon.size(); i++) { for (int i = 0; i < polygon.size(); i++) {
const QVector<Coordinates> &subpath = polygon.at(i); const QVector<Coordinates> &subpath = polygon.at(i);
path.moveTo(ll2xy(subpath.first())); QVector<QPointF> p(subpath.size());
for (int j = 1; j < subpath.size(); j++) for (int j = 0; j < subpath.size(); j++)
path.lineTo(ll2xy(subpath.at(j))); p[j] = ll2xy(subpath.at(j));
path.addPolygon(p);
} }
return path; return path;