mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Improved areas rendering performance
This commit is contained in:
parent
3ba684aafc
commit
fa1025ea15
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user