Only use the image-lines when there is direction info present for the lines
@ -313,6 +313,7 @@
|
||||
<file alias="degaussing-line.png">icons/map/marine/degaussing-line.png</file>
|
||||
<file alias="nofishing-line.png">icons/map/marine/nofishing-line.png</file>
|
||||
<file alias="fishing-line.png">icons/map/marine/fishing-line.png</file>
|
||||
<file alias="minefield-line.png">icons/map/marine/minefield-line.png</file>
|
||||
</qresource>
|
||||
|
||||
<!-- Patterns (Mapsforge) -->
|
||||
|
Before Width: | Height: | Size: 170 B After Width: | Height: | Size: 295 B |
Before Width: | Height: | Size: 130 B After Width: | Height: | Size: 225 B |
Before Width: | Height: | Size: 336 B After Width: | Height: | Size: 348 B |
BIN
icons/map/marine/minefield-line.png
Normal file
After Width: | Height: | Size: 200 B |
Before Width: | Height: | Size: 137 B After Width: | Height: | Size: 235 B |
@ -33,7 +33,8 @@ public:
|
||||
|
||||
enum Flags {
|
||||
OneWay = 1,
|
||||
Invert = 2
|
||||
Invert = 2,
|
||||
Direction = 4
|
||||
};
|
||||
|
||||
/* QPointF insted of Coordinates for performance reasons (no need to
|
||||
|
@ -204,7 +204,9 @@ void RasterTile::drawLines(QPainter *painter,
|
||||
|
||||
for (int i = 0; i < lines.size(); i++) {
|
||||
const MapData::Poly &poly = lines.at(i);
|
||||
const Style::Line &style = _data->style()->line(poly.type);
|
||||
const Style::Line &style = _data->style()->line(
|
||||
(poly.flags & MapData::Poly::Direction)
|
||||
? poly.type | 1<<20 : poly.type);
|
||||
|
||||
if (!style.img().isNull()) {
|
||||
if (poly.flags & MapData::Poly::Invert)
|
||||
|
@ -252,7 +252,9 @@ bool RGNFile::readLineInfo(Handle &hdl, quint32 size, MapData::Poly *line) const
|
||||
if (!readUInt8(hdl, val))
|
||||
return false;
|
||||
|
||||
if (((val >> 3) & 3) & 2)
|
||||
if ((val >> 3) & 3)
|
||||
line->flags |= MapData::Poly::Direction;
|
||||
if ((val >> 3) & 2)
|
||||
line->flags |= MapData::Poly::Invert;
|
||||
|
||||
return true;
|
||||
|
@ -495,26 +495,41 @@ void Style::defaultLineStyle(qreal ratio)
|
||||
_lines[0x10309] = Line(QPen(QColor(0x0e, 0x10, 0x87), 1, Qt::SolidLine));
|
||||
_lines[0x10401] = Line(QImage(":/marine/cable.png"));
|
||||
_lines[0x10402] = Line(QImage(":/marine/pipeline.png"));
|
||||
_lines[0x10403] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 2, Qt::DotLine));
|
||||
_lines[0x10404] = Line(QImage(":/marine/fishing-farm-line.png"));
|
||||
_lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png"));
|
||||
_lines[0x10406] = Line(QImage(":/marine/cable-area-line.png"));
|
||||
_lines[0x10405] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110405] = Line(QImage(":/marine/pipeline-area-line.png"));
|
||||
_lines[0x10406] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110406] = Line(QImage(":/marine/cable-area-line.png"));
|
||||
_lines[0x10407] = Line(QPen(QColor(0xa3, 0xa3, 0xa3), 1, Qt::DashLine));
|
||||
_lines[0x10408] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine));
|
||||
_lines[0x10409] = Line(QPen(QColor(0, 0, 0), 1, Qt::DotLine));
|
||||
_lines[0x1040b] = Line(QPen(QColor(0, 0, 0), 2, Qt::DashLine));
|
||||
_lines[0x1040c] = Line(QPen(QColor(0, 0, 0), 2));
|
||||
_lines[0x10501] = Line(QImage(":/marine/noanchor-line.png"));
|
||||
_lines[0x10502] = Line(QImage(":/marine/nofishing-line.png"));
|
||||
_lines[0x10503] = Line(QImage(":/marine/entry-prohibited-line.png"));
|
||||
_lines[0x10501] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110501] = Line(QImage(":/marine/noanchor-line.png"));
|
||||
_lines[0x10502] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110502] = Line(QImage(":/marine/nofishing-line.png"));
|
||||
_lines[0x10503] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110503] = Line(QImage(":/marine/entry-prohibited-line.png"));
|
||||
_lines[0x10504] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x10505] = Line(QImage(":/marine/noanchor-line.png"));
|
||||
_lines[0x10506] = Line(QImage(":/marine/nature-reserve-line.png"));
|
||||
_lines[0x10507] = Line(QImage(":/marine/safety-zone-line.png"));
|
||||
_lines[0x10505] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110505] = Line(QImage(":/marine/noanchor-line.png"));
|
||||
_lines[0x10506] = Line(QPen(QColor(0x30, 0xa0, 0x1b), 1, Qt::DashLine));
|
||||
_lines[0x110506] = Line(QImage(":/marine/nature-reserve-line.png"));
|
||||
_lines[0x10507] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110507] = Line(QImage(":/marine/safety-zone-line.png"));
|
||||
_lines[0x10508] = Line(QPen(QColor(0xff, 0x40, 0x40), 1, Qt::DashLine));
|
||||
_lines[0x110508] = Line(QImage(":/marine/minefield-line.png"));
|
||||
_lines[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::DashLine));
|
||||
_lines[0x10602] = Line(QPen(QColor(0xfc, 0xb4, 0xfc), 2));
|
||||
_lines[0x10603] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1.5, Qt::DashDotLine));
|
||||
_lines[0x10604] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotLine));
|
||||
_lines[0x10606] = Line(QImage(":/marine/anchor-line.png"));
|
||||
_lines[0x10608] = Line(QImage(":/marine/fishing-line.png"));
|
||||
_lines[0x10606] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110606] = Line(QImage(":/marine/anchor-line.png"));
|
||||
_lines[0x10608] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashLine));
|
||||
_lines[0x110608] = Line(QImage(":/marine/fishing-line.png"));
|
||||
_lines[0x1060b] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::DashDotDotLine));
|
||||
_lines[0x1060c] = Line(QPen(QColor(0xe7, 0x28, 0xe7), 1, Qt::SolidLine));
|
||||
_lines[0x1060d] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine));
|
||||
_lines[0x10611] = Line(QPen(QColor(0xeb, 0x49, 0xeb), 1, Qt::DashLine));
|
||||
|