mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-28 13:41:16 +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++) {
|
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;
|
||||||
|
Loading…
Reference in New Issue
Block a user