mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 11:45:53 +01:00
Compare commits
No commits in common. "734ba4bf4455bc055e81a5c1aa263d09df2b0965" and "1a9bec1d943fffec7180221c440a87f192e5e21c" have entirely different histories.
734ba4bf44
...
1a9bec1d94
@ -6,8 +6,10 @@
|
|||||||
|
|
||||||
<!-- Common map stuff -->
|
<!-- Common map stuff -->
|
||||||
<qresource prefix="/map">
|
<qresource prefix="/map">
|
||||||
<file alias="arrow.svg">icons/map/arrow.svg</file>
|
<file alias="arrow.png">icons/map/arrow.png</file>
|
||||||
<file alias="water-arrow.svg">icons/map/water-arrow.svg</file>
|
<file alias="arrow@2x.png">icons/map/arrow@2x.png</file>
|
||||||
|
<file alias="water-arrow.png">icons/map/water-arrow.png</file>
|
||||||
|
<file alias="water-arrow@2x.png">icons/map/water-arrow@2x.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
|
|
||||||
<!-- POIs (IMG & ENC style) -->
|
<!-- POIs (IMG & ENC style) -->
|
||||||
|
BIN
icons/map/arrow.png
Normal file
BIN
icons/map/arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 175 B |
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg width="16" height="8" viewBox="0 0 16 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<g transform="matrix(0.80193135,0,0,1.0047131,-0.02082299,-6.0023103)">
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:64;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"
|
|
||||||
d="m 358.53516,372.24219 c -0.33985,-21.07032 -0.67969,-42.25391 -0.90625,-63.4375 H 46.332031 c -5.210937,0.11328 -13.480469,-8.15625 -13.480469,-18.57813 0,-10.42187 8.382813,-18.57812 13.59375,-18.57812 l 312.316408,0.11328 V 207.75781 L 547.26172,290 Z m 0,0"
|
|
||||||
transform="scale(0.0344828)"/>
|
|
||||||
<path
|
|
||||||
style="display:inline;fill:#666666;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
||||||
d="m 12.363281,12.835938 c -0.01172,-0.726563 -0.02344,-1.457032 -0.03125,-2.1875 H 1.597656 c -0.179687,0.0039 -0.464844,-0.28125 -0.464844,-0.640626 0,-0.359374 0.289063,-0.640624 0.46875,-0.640624 l 10.769532,0.00391 V 7.164062 l 6.5,2.835938 z m 0,0"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
icons/map/arrow@2x.png
Normal file
BIN
icons/map/arrow@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 241 B |
BIN
icons/map/water-arrow.png
Normal file
BIN
icons/map/water-arrow.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 181 B |
@ -1,12 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<svg width="16" height="8" viewBox="0 0 16 8" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg">
|
|
||||||
<g transform="matrix(0.80193135,0,0,1.0047131,-0.02082299,-6.0023103)">
|
|
||||||
<path
|
|
||||||
style="fill:none;stroke:#ffffff;stroke-width:64;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1"
|
|
||||||
d="m 358.53516,372.24219 c -0.33985,-21.07032 -0.67969,-42.25391 -0.90625,-63.4375 H 46.332031 c -5.210937,0.11328 -13.480469,-8.15625 -13.480469,-18.57813 0,-10.42187 8.382813,-18.57812 13.59375,-18.57812 l 312.316408,0.11328 V 207.75781 L 547.26172,290 Z m 0,0"
|
|
||||||
transform="scale(0.0344828)"/>
|
|
||||||
<path
|
|
||||||
style="display:inline;fill:#9fc4e1;fill-opacity:1;fill-rule:nonzero;stroke:none"
|
|
||||||
d="m 12.363281,12.835938 c -0.01172,-0.726563 -0.02344,-1.457032 -0.03125,-2.1875 H 1.597656 c -0.179687,0.0039 -0.464844,-0.28125 -0.464844,-0.640626 0,-0.359374 0.289063,-0.640624 0.46875,-0.640624 l 10.769532,0.00391 V 7.164062 l 6.5,2.835938 z m 0,0"/>
|
|
||||||
</g>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 1.1 KiB |
BIN
icons/map/water-arrow@2x.png
Normal file
BIN
icons/map/water-arrow@2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 249 B |
@ -1,7 +1,6 @@
|
|||||||
#include <QFont>
|
#include <QFont>
|
||||||
#include <QPainter>
|
#include <QPainter>
|
||||||
#include <QCache>
|
#include <QCache>
|
||||||
#include "common/util.h"
|
|
||||||
#include "map/dem.h"
|
#include "map/dem.h"
|
||||||
#include "map/textpathitem.h"
|
#include "map/textpathitem.h"
|
||||||
#include "map/textpointitem.h"
|
#include "map/textpointitem.h"
|
||||||
@ -22,6 +21,11 @@ using namespace IMG;
|
|||||||
#define AREA(rect) \
|
#define AREA(rect) \
|
||||||
(rect.size().width() * rect.size().height())
|
(rect.size().width() * rect.size().height())
|
||||||
|
|
||||||
|
#define HIDPI_IMG(dir, basename, ratio) \
|
||||||
|
(((ratio) > 1.0) \
|
||||||
|
? QImage(dir "/" basename "@2x.png") \
|
||||||
|
: QImage(dir "/" basename ".png"))
|
||||||
|
|
||||||
#define ROAD 0
|
#define ROAD 0
|
||||||
#define WATER 1
|
#define WATER 1
|
||||||
|
|
||||||
@ -513,8 +517,8 @@ void RasterTile::render()
|
|||||||
QList<TextItem*> textItems;
|
QList<TextItem*> textItems;
|
||||||
QImage arrows[2];
|
QImage arrows[2];
|
||||||
|
|
||||||
arrows[ROAD] = Util::svg2img(":/map/arrow.svg", _ratio);
|
arrows[ROAD] = HIDPI_IMG(":/map", "arrow", _ratio);
|
||||||
arrows[WATER] = Util::svg2img(":/map/water-arrow.svg", _ratio);
|
arrows[WATER] = HIDPI_IMG(":/map", "water-arrow", _ratio);
|
||||||
|
|
||||||
fetchData(polygons, lines, points);
|
fetchData(polygons, lines, points);
|
||||||
ll2xy(polygons);
|
ll2xy(polygons);
|
||||||
|
@ -205,14 +205,17 @@ void RasterTile::processAreaLabels(const QVector<PainterPath> &paths,
|
|||||||
const QColor *color = p.ti ? &p.ti->fillColor() : 0;
|
const QColor *color = p.ti ? &p.ti->fillColor() : 0;
|
||||||
const QColor *hColor = p.ti ? haloColor(p.ti) : 0;
|
const QColor *hColor = p.ti ? haloColor(p.ti) : 0;
|
||||||
|
|
||||||
|
QPainterPath rp;
|
||||||
|
rp.addRect(_rect);
|
||||||
QPointF pos = p.p->path->labelPos.isNull()
|
QPointF pos = p.p->path->labelPos.isNull()
|
||||||
? centroid(p.p->pp) : ll2xy(p.p->path->labelPos);
|
? centroid(p.p->pp & rp) : ll2xy(p.p->path->labelPos);
|
||||||
if (p.ti && p.lbl && set.contains(*p.lbl))
|
if (p.ti && p.lbl && set.contains(*p.lbl))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
PointItem *item = new PointItem(pos.toPoint(), p.lbl, font, img, color,
|
||||||
hColor);
|
hColor);
|
||||||
if (item->isValid() && rectNearPolygon(p.p->pp, item->boundingRect())
|
if (item->isValid() && _rect.contains(item->boundingRect().toRect())
|
||||||
|
&& rectNearPolygon(p.p->pp, item->boundingRect())
|
||||||
&& !item->collides(textItems)) {
|
&& !item->collides(textItems)) {
|
||||||
textItems.append(item);
|
textItems.append(item);
|
||||||
if (p.ti && p.lbl)
|
if (p.ti && p.lbl)
|
||||||
|
Loading…
Reference in New Issue
Block a user