1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-06 06:43:22 +02:00

Improved areas rendering performance

This commit is contained in:
Martin Tůma 2021-03-09 23:21:10 +01:00
parent 3ba684aafc
commit fa1025ea15

View File

@ -52,12 +52,10 @@ QPainterPath AreaItem::painterPath(const Polygon &polygon)
for (int i = 1; i < polygon.size(); i++) {
const QVector<Coordinates> &lr = polygon.at(i);
QPainterPath hole;
hole.moveTo(_map->ll2xy(lr.first()));
path.moveTo(_map->ll2xy(lr.first()));
for (int j = 1; j < lr.size(); j++)
hole.lineTo(_map->ll2xy(lr.at(j)));
hole.closeSubpath();
path = path.subtracted(hole);
path.lineTo(_map->ll2xy(lr.at(j)));
path.closeSubpath();
}
return path;