mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 05:34:47 +01:00
Optimization
This commit is contained in:
parent
c6c3e0978c
commit
d6d43baec5
@ -129,9 +129,10 @@ QPainterPath RasterTile::painterPath(const Polygon &polygon) const
|
||||
for (int i = 0; i < polygon.size(); i++) {
|
||||
const QVector<Coordinates> &subpath = polygon.at(i);
|
||||
|
||||
path.moveTo(ll2xy(subpath.first()));
|
||||
for (int j = 1; j < subpath.size(); j++)
|
||||
path.lineTo(ll2xy(subpath.at(j)));
|
||||
QVector<QPointF> p(subpath.size());
|
||||
for (int j = 0; j < subpath.size(); j++)
|
||||
p[j] = ll2xy(subpath.at(j));
|
||||
path.addPolygon(p);
|
||||
}
|
||||
|
||||
return path;
|
||||
|
Loading…
Reference in New Issue
Block a user