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++) {
|
for (int i = 1; i < polygon.size(); i++) {
|
||||||
const QVector<Coordinates> &lr = polygon.at(i);
|
const QVector<Coordinates> &lr = polygon.at(i);
|
||||||
QPainterPath hole;
|
path.moveTo(_map->ll2xy(lr.first()));
|
||||||
hole.moveTo(_map->ll2xy(lr.first()));
|
|
||||||
for (int j = 1; j < lr.size(); j++)
|
for (int j = 1; j < lr.size(); j++)
|
||||||
hole.lineTo(_map->ll2xy(lr.at(j)));
|
path.lineTo(_map->ll2xy(lr.at(j)));
|
||||||
hole.closeSubpath();
|
path.closeSubpath();
|
||||||
path = path.subtracted(hole);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return path;
|
return path;
|
||||||
|
Loading…
Reference in New Issue
Block a user