mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-04-21 12:49:10 +02:00
Compare commits
No commits in common. "e351eb6370bb1a6e60bf940d4399464664fd3dc0" and "cf81a90865b81f93e462867e3072b773a4fb734c" have entirely different histories.
e351eb6370
...
cf81a90865
@ -497,9 +497,6 @@ int MapData::level(int zoom) const
|
|||||||
|
|
||||||
void MapData::points(const RectC &rect, int zoom, QList<Point> *list)
|
void MapData::points(const RectC &rect, int zoom, QList<Point> *list)
|
||||||
{
|
{
|
||||||
if (!rect.isValid())
|
|
||||||
return;
|
|
||||||
|
|
||||||
int l(level(zoom));
|
int l(level(zoom));
|
||||||
PointCTX ctx(this, rect, zoom, list);
|
PointCTX ctx(this, rect, zoom, list);
|
||||||
double min[2], max[2];
|
double min[2], max[2];
|
||||||
@ -531,9 +528,6 @@ void MapData::points(const VectorTile *tile, const RectC &rect, int zoom,
|
|||||||
|
|
||||||
void MapData::paths(const RectC &rect, int zoom, QList<Path> *list)
|
void MapData::paths(const RectC &rect, int zoom, QList<Path> *list)
|
||||||
{
|
{
|
||||||
if (!rect.isValid())
|
|
||||||
return;
|
|
||||||
|
|
||||||
int l(level(zoom));
|
int l(level(zoom));
|
||||||
PathCTX ctx(this, rect, zoom, list);
|
PathCTX ctx(this, rect, zoom, list);
|
||||||
double min[2], max[2];
|
double min[2], max[2];
|
||||||
|
@ -200,7 +200,6 @@ QPainterPath RasterTile::painterPath(const Polygon &polygon, bool curve) const
|
|||||||
{
|
{
|
||||||
QPainterPath path;
|
QPainterPath path;
|
||||||
|
|
||||||
if (curve) {
|
|
||||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
|
#if QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)
|
||||||
int size = 0;
|
int size = 0;
|
||||||
for (int i = 0; i < polygon.size(); i++)
|
for (int i = 0; i < polygon.size(); i++)
|
||||||
@ -211,6 +210,7 @@ QPainterPath RasterTile::painterPath(const Polygon &polygon, bool curve) 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);
|
||||||
|
|
||||||
|
if (curve) {
|
||||||
QPointF p1(ll2xy(subpath.first()));
|
QPointF p1(ll2xy(subpath.first()));
|
||||||
QPointF p2(0, 0);
|
QPointF p2(0, 0);
|
||||||
QPointF p3(0, 0);
|
QPointF p3(0, 0);
|
||||||
@ -223,11 +223,7 @@ QPainterPath RasterTile::painterPath(const Polygon &polygon, bool curve) const
|
|||||||
p1 = p3;
|
p1 = p3;
|
||||||
}
|
}
|
||||||
path.quadTo(p2, p3);
|
path.quadTo(p2, p3);
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
for (int i = 0; i < polygon.size(); i++) {
|
|
||||||
const QVector<Coordinates> &subpath = polygon.at(i);
|
|
||||||
|
|
||||||
QVector<QPointF> p(subpath.size());
|
QVector<QPointF> p(subpath.size());
|
||||||
for (int j = 0; j < subpath.size(); j++)
|
for (int j = 0; j < subpath.size(); j++)
|
||||||
p[j] = ll2xy(subpath.at(j));
|
p[j] = ll2xy(subpath.at(j));
|
||||||
|
@ -211,9 +211,8 @@ void MapsforgeMap::draw(QPainter *painter, const QRectF &rect, Flags flags)
|
|||||||
_data.points(pointRectD.toRectC(_projection, 20), _zoom,
|
_data.points(pointRectD.toRectC(_projection, 20), _zoom,
|
||||||
&points);
|
&points);
|
||||||
|
|
||||||
if (paths.size() || points.size())
|
tiles.append(RasterTile(_projection, _transform, &_style, _zoom,
|
||||||
tiles.append(RasterTile(_projection, _transform, &_style,
|
QRect(ttl, QSize(_data.tileSize(), _data.tileSize())),
|
||||||
_zoom, QRect(ttl, QSize(_data.tileSize(), _data.tileSize())),
|
|
||||||
_tileRatio, paths, points));
|
_tileRatio, paths, points));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user