mirror of
https://github.com/tumic0/GPXSee.git
synced 2025-07-22 14:54:24 +02:00
Compare commits
5 Commits
13.33
...
67b91f62a0
Author | SHA1 | Date | |
---|---|---|---|
67b91f62a0 | |||
0ab6e02e6c | |||
7f20e2e307 | |||
68f1f1fc3f | |||
a4449897a7 |
@ -1,4 +1,4 @@
|
||||
version: 13.33.{build}
|
||||
version: 13.34.{build}
|
||||
|
||||
configuration:
|
||||
- Release
|
||||
|
@ -3,7 +3,7 @@ unix:!macx:!android {
|
||||
} else {
|
||||
TARGET = GPXSee
|
||||
}
|
||||
VERSION = 13.33
|
||||
VERSION = 13.34
|
||||
|
||||
|
||||
QT += core \
|
||||
|
@ -206,6 +206,7 @@
|
||||
<file alias="kelp.png">icons/map/marine/kelp.png</file>
|
||||
<file alias="eddies.png">icons/map/marine/eddies.png</file>
|
||||
<file alias="dome.png">icons/map/marine/dome.png</file>
|
||||
<file alias="radar-reflector.png">icons/map/marine/radar-reflector.png</file>
|
||||
</qresource>
|
||||
|
||||
<!-- Patterns (Mapsforge) -->
|
||||
|
BIN
icons/map/marine/radar-reflector.png
Normal file
BIN
icons/map/marine/radar-reflector.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 236 B |
@ -37,7 +37,7 @@ Unicode true
|
||||
; The name of the installer
|
||||
Name "GPXSee"
|
||||
; Program version
|
||||
!define VERSION "13.33"
|
||||
!define VERSION "13.34"
|
||||
|
||||
; The file to write
|
||||
OutFile "GPXSee-${VERSION}_x64.exe"
|
||||
|
@ -63,16 +63,17 @@ static QMap<uint,uint> orderMapInit()
|
||||
map.insert(TYPE(PILPNT), 34);
|
||||
map.insert(TYPE(ACHBRT), 35);
|
||||
map.insert(TYPE(I_ACHBRT), 35);
|
||||
map.insert(TYPE(CRANES), 36);
|
||||
map.insert(TYPE(I_CRANES), 36);
|
||||
map.insert(TYPE(I_WTWGAG), 37);
|
||||
map.insert(TYPE(PYLONS), 38);
|
||||
map.insert(TYPE(SLCONS), 39);
|
||||
map.insert(TYPE(LNDMRK), 40);
|
||||
map.insert(TYPE(SILTNK), 41);
|
||||
map.insert(TYPE(LNDELV), 42);
|
||||
map.insert(TYPE(SMCFAC), 43);
|
||||
map.insert(TYPE(BUISGL), 44);
|
||||
map.insert(TYPE(RADRFL), 36);
|
||||
map.insert(TYPE(CRANES), 37);
|
||||
map.insert(TYPE(I_CRANES), 37);
|
||||
map.insert(TYPE(I_WTWGAG), 38);
|
||||
map.insert(TYPE(PYLONS), 39);
|
||||
map.insert(TYPE(SLCONS), 40);
|
||||
map.insert(TYPE(LNDMRK), 41);
|
||||
map.insert(TYPE(SILTNK), 42);
|
||||
map.insert(TYPE(LNDELV), 43);
|
||||
map.insert(TYPE(SMCFAC), 44);
|
||||
map.insert(TYPE(BUISGL), 45);
|
||||
|
||||
map.insert(TYPE(I_DISMAR), 0xFFFFFFFE);
|
||||
map.insert(TYPE(SOUNDG), 0xFFFFFFFF);
|
||||
@ -285,7 +286,8 @@ MapData::Point::Point(uint type, const Coordinates &c, const QString &label,
|
||||
else
|
||||
_label += "\n(" + QString::fromLatin1(params.at(0))
|
||||
+ "\xE2\x80\x89m)";
|
||||
}
|
||||
} else if ((type == TYPE(TSSLPT) || type == TYPE(RCTLPT)) && params.size())
|
||||
_param = QVariant(params.at(0).toDouble());
|
||||
}
|
||||
|
||||
MapData::Poly::Poly(uint type, const Polygon &path, const QString &label,
|
||||
@ -293,7 +295,7 @@ MapData::Poly::Poly(uint type, const Polygon &path, const QString &label,
|
||||
{
|
||||
if (type == TYPE(DEPARE) && params.size())
|
||||
_type = SUBTYPE(DEPARE, depthLevel(params.at(0)));
|
||||
else if (type == TYPE(TSSLPT) && params.size())
|
||||
else if ((type == TYPE(TSSLPT) || type == TYPE(RCTLPT)) && params.size())
|
||||
_param = QVariant(params.at(0).toDouble());
|
||||
else if ((type == TYPE(BRIDGE) || type == TYPE(I_BRIDGE))
|
||||
&& params.size()) {
|
||||
@ -595,7 +597,9 @@ MapData::Attr MapData::pointAttr(const ISO8211::Record &r, uint OBJL)
|
||||
|| (OBJL == RDOCAL && key == ORIENT)
|
||||
|| (OBJL == I_RDOCAL && key == ORIENT)
|
||||
|| (OBJL == CURENT && key == ORIENT)
|
||||
|| (OBJL == LNDELV && key == ELEVAT))
|
||||
|| (OBJL == LNDELV && key == ELEVAT)
|
||||
|| (OBJL == TSSLPT && key == ORIENT)
|
||||
|| (OBJL == RCTLPT && key == ORIENT))
|
||||
params[0] = av.at(1).toByteArray();
|
||||
if ((OBJL == I_RDOCAL && key == COMCHA)
|
||||
|| (OBJL == RDOCAL && key == COMCHA)
|
||||
@ -668,6 +672,7 @@ MapData::Attr MapData::polyAttr(const ISO8211::Record &r, uint OBJL)
|
||||
}
|
||||
|
||||
if ((OBJL == TSSLPT && key == ORIENT)
|
||||
|| (OBJL == RCTLPT && key == ORIENT)
|
||||
|| (OBJL == DEPARE && key == DRVAL1))
|
||||
params[0] = av.at(1).toByteArray();
|
||||
if ((OBJL == BRIDGE && key == VERCLR)
|
||||
|
@ -67,6 +67,7 @@
|
||||
#define PONTON 95
|
||||
#define PRCARE 96
|
||||
#define PYLONS 98
|
||||
#define RADRFL 101
|
||||
#define RADSTA 102
|
||||
#define RTPBCN 103
|
||||
#define RDOCAL 104
|
||||
@ -74,6 +75,7 @@
|
||||
#define RAILWY 106
|
||||
#define RCRTCL 108
|
||||
#define RECTRC 109
|
||||
#define RCTLPT 110
|
||||
#define RSCSTA 111
|
||||
#define RESARE 112
|
||||
#define RIVERS 114
|
||||
|
@ -150,19 +150,42 @@ QPolygonF RasterTile::tsslptArrow(const QPointF &p, qreal angle) const
|
||||
return polygon;
|
||||
}
|
||||
|
||||
static void drawArrow(QPainter *painter, const QPolygonF &polygon, uint type)
|
||||
{
|
||||
if (type>>16 == RCTLPT) {
|
||||
painter->setPen(QPen(tsslptPen, 1, Qt::DashLine));
|
||||
painter->setBrush(Qt::NoBrush);
|
||||
} else {
|
||||
painter->setPen(QPen(tsslptPen, 1));
|
||||
painter->setBrush(QBrush(tsslptBrush));
|
||||
}
|
||||
painter->drawPolygon(polygon);
|
||||
}
|
||||
|
||||
void RasterTile::drawArrows(QPainter *painter,
|
||||
const QList<MapData::Poly> &polygons)
|
||||
{
|
||||
for (int i = 0; i < polygons.size(); i++) {
|
||||
const MapData::Poly &poly = polygons.at(i);
|
||||
|
||||
if (poly.type()>>16 == TSSLPT) {
|
||||
if (poly.type()>>16 == TSSLPT || poly.type()>>16 == RCTLPT) {
|
||||
QPolygonF polygon(tsslptArrow(centroid(poly.path().first()),
|
||||
deg2rad(poly.param().toDouble())));
|
||||
drawArrow(painter, polygon, poly.type());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
painter->setPen(QPen(tsslptPen, 1));
|
||||
painter->setBrush(QBrush(tsslptBrush));
|
||||
painter->drawPolygon(polygon);
|
||||
void RasterTile::drawArrows(QPainter *painter,
|
||||
const QList<MapData::Point> &points)
|
||||
{
|
||||
for (int i = 0; i < points.size(); i++) {
|
||||
const MapData::Point &point = points.at(i);
|
||||
|
||||
if (point.type()>>16 == TSSLPT || point.type()>>16 == RCTLPT) {
|
||||
QPolygonF polygon(tsslptArrow(ll2xy(point.pos()),
|
||||
deg2rad(point.param().toDouble())));
|
||||
drawArrow(painter, polygon, point.type());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -400,6 +423,7 @@ void RasterTile::render()
|
||||
drawPolygons(&painter, polygons);
|
||||
drawLines(&painter, lines);
|
||||
drawArrows(&painter, polygons);
|
||||
drawArrows(&painter, points);
|
||||
|
||||
drawTextItems(&painter, lights);
|
||||
drawTextItems(&painter, textItems);
|
||||
|
@ -52,6 +52,7 @@ private:
|
||||
void drawBitmapPath(QPainter *painter, const QImage &img,
|
||||
const Polygon &polygon);
|
||||
void drawArrows(QPainter *painter, const QList<MapData::Poly> &polygons);
|
||||
void drawArrows(QPainter *painter, const QList<MapData::Point> &points);
|
||||
void drawPolygons(QPainter *painter, const QList<MapData::Poly> &polygons);
|
||||
void drawLines(QPainter *painter, const QList<MapData::Line> &lines);
|
||||
void drawTextItems(QPainter *painter, const QList<TextItem*> &textItems);
|
||||
|
@ -335,6 +335,7 @@ void Style::pointStyle(qreal ratio)
|
||||
_points[SUBTYPE(WEDKLP, 0)] = Point(QImage(":/marine/kelp.png"));
|
||||
_points[SUBTYPE(WEDKLP, 1)] = Point(QImage(":/marine/kelp.png"));
|
||||
_points[TYPE(SEAARE)].setHaloColor(QColor());
|
||||
_points[TYPE(RADRFL)] = Point(QImage(":/marine/radar-reflector.png"));
|
||||
|
||||
_points[SUBTYPE(SMCFAC, 7)] = Point(svg2img(":/POI/restaurant-11.svg",
|
||||
ratio), Small);
|
||||
|
@ -60,18 +60,14 @@ private:
|
||||
struct Context
|
||||
{
|
||||
Context(quint16 width, quint16 range)
|
||||
: data(QVector<quint16>((width + 3) * 2)), w(width), rg(1),
|
||||
runIndex(0), rk(0), lrk(0)
|
||||
{
|
||||
w = width;
|
||||
data = QVector<quint16>((w + 3) * 2);
|
||||
quint16 A = qMax(2, (range + 32) / 64);
|
||||
|
||||
last = data.data();
|
||||
current = data.data() + (w + 3);
|
||||
|
||||
runIndex = 0;
|
||||
rk = 0;
|
||||
rg = 1;
|
||||
lrk = 0;
|
||||
|
||||
quint16 A = qMax(2, (range + 32) / 64);
|
||||
for (int i = 0; i < 4; i++) {
|
||||
a[i] = A;
|
||||
b[i] = 0;
|
||||
@ -79,18 +75,17 @@ private:
|
||||
}
|
||||
}
|
||||
|
||||
quint8 runIndex;
|
||||
quint8 rk;
|
||||
QVector<quint16> data;
|
||||
quint16 *current;
|
||||
quint16 *last;
|
||||
quint16 w;
|
||||
quint16 rg;
|
||||
quint16 n[4];
|
||||
quint16 a[4];
|
||||
qint16 b[4];
|
||||
quint8 runIndex;
|
||||
quint8 rk;
|
||||
quint8 lrk;
|
||||
|
||||
quint16 w;
|
||||
QVector<quint16> data;
|
||||
quint16 *current;
|
||||
quint16 *last;
|
||||
};
|
||||
|
||||
bool readLine(BitStream &bs, Context &ctx) const;
|
||||
|
Reference in New Issue
Block a user