diff --git a/src/map/ENC/attributes.h b/src/map/ENC/attributes.h index 7cef6a21..b4a38c58 100644 --- a/src/map/ENC/attributes.h +++ b/src/map/ENC/attributes.h @@ -5,6 +5,7 @@ #define CATBUA 10 #define CATCOV 18 #define CATDIS 21 +#define CATDPG 23 #define CATHAF 30 #define CATLMK 35 #define CATLIT 37 diff --git a/src/map/ENC/mapdata.cpp b/src/map/ENC/mapdata.cpp index fa0f9960..241d3173 100644 --- a/src/map/ENC/mapdata.cpp +++ b/src/map/ENC/mapdata.cpp @@ -87,6 +87,7 @@ static QMap orderMapInit() map.insert(TYPE(BUISGL), 46); map.insert(TYPE(ACHARE), 47); map.insert(TYPE(I_ACHARE), 47); + map.insert(TYPE(DMPGRD), 48); map.insert(TYPE(I_DISMAR), 0xFFFFFFFE); map.insert(TYPE(SOUNDG), 0xFFFFFFFF); @@ -191,7 +192,7 @@ static bool polygonPointCb(const MapData::Poly *polygon, void *context) if (baseType == TSSLPT || baseType == RCTLPT || baseType == I_TRNBSN || baseType == BRIDGE || baseType == I_BRIDGE || baseType == BUAARE || baseType == LNDARE || baseType == LNDRGN || baseType == I_BUNSTA - || baseType == PILBOP + || baseType == PILBOP || baseType == DMPGRD || type == SUBTYPE(ACHARE, 2) || type == SUBTYPE(I_ACHARE, 2) || type == SUBTYPE(ACHARE, 3) || type == SUBTYPE(I_ACHARE, 3) || type == SUBTYPE(ACHARE, 9) || type == SUBTYPE(I_ACHARE, 9) @@ -477,6 +478,8 @@ MapData::Poly::Poly(uint type, const Polygon &path, const Attributes &attr, subtype = I_CATBRT; else if (type == M_COVR) subtype = CATCOV; + else if (type == DMPGRD) + subtype = CATDPG; switch (type) { case DEPARE: diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index 60e4d6e5..5cb0e6db 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -104,7 +104,19 @@ void Style::polygonStyle() _polygons[SUBTYPE(DEPARE, 5)] = Polygon(QBrush(QColor(0xc0, 0xe0, 0xff))); _polygons[SUBTYPE(DEPARE, 6)] = Polygon(QBrush(QColor(0xff, 0xff, 0xff))); _polygons[TYPE(DMPGRD)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), - Qt::Dense3Pattern)); + Qt::Dense5Pattern)); + _polygons[SUBTYPE(DMPGRD, 1)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), + Qt::Dense5Pattern)); + _polygons[SUBTYPE(DMPGRD, 2)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), + Qt::Dense5Pattern)); + _polygons[SUBTYPE(DMPGRD, 3)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), + Qt::Dense5Pattern)); + _polygons[SUBTYPE(DMPGRD, 4)] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), + Qt::Dense5Pattern)); + _polygons[SUBTYPE(DMPGRD, 5)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), + Qt::Dense5Pattern)); + _polygons[SUBTYPE(DMPGRD, 6)] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), + Qt::Dense5Pattern)); _polygons[TYPE(FAIRWY)] = Polygon(Qt::NoBrush, QPen(QColor(0x88, 0x88, 0x88), 1, Qt::DashDotDotLine)); _polygons[TYPE(OBSTRN)] = Polygon(Qt::NoBrush, QPen(QColor(0, 0, 0), 1.5, @@ -244,7 +256,9 @@ void Style::polygonStyle() << TYPE(HULKES) << TYPE(I_HULKES) << TYPE(FLODOC) << TYPE(I_FLODOC) << TYPE(DRYDOC) << TYPE(DAMCON) << TYPE(PYLONS) << TYPE(MORFAC) << TYPE(GATCON) << TYPE(I_GATCON) << TYPE(BERTHS) << TYPE(I_BERTHS) - << SUBTYPE(I_BERTHS, 6) << TYPE(DMPGRD) << TYPE(TSEZNE) << TYPE(OBSTRN) + << SUBTYPE(I_BERTHS, 6) << TYPE(DMPGRD) << SUBTYPE(DMPGRD, 1) + << SUBTYPE(DMPGRD, 2) << SUBTYPE(DMPGRD, 3) << SUBTYPE(DMPGRD, 4) + << SUBTYPE(DMPGRD, 5) << SUBTYPE(DMPGRD, 6) << TYPE(TSEZNE) << TYPE(OBSTRN) << TYPE(UWTROC) << TYPE(DWRTPT) << SUBTYPE(ACHARE, 1) << SUBTYPE(ACHARE, 2) << SUBTYPE(ACHARE, 3) << SUBTYPE(ACHARE, 4) << SUBTYPE(ACHARE, 5) << SUBTYPE(ACHARE, 6) << SUBTYPE(ACHARE, 7) @@ -542,6 +556,15 @@ void Style::pointStyle(qreal ratio) _points[SUBTYPE(I_RESARE, 23)] = _points[SUBTYPE(RESARE, 23)]; _points[SUBTYPE(I_RESARE, 25)] = _points[SUBTYPE(RESARE, 25)]; _points[SUBTYPE(I_RESARE, 26)] = _points[SUBTYPE(RESARE, 26)]; + _points[TYPE(DMPGRD)].setTextColor(QColor(0x5d, 0x5b, 0x59)); + _points[TYPE(DMPGRD)].setHaloColor(QColor()); + _points[SUBTYPE(DMPGRD, 1)] = _points[TYPE(DMPGRD)]; + _points[SUBTYPE(DMPGRD, 2)] = _points[TYPE(DMPGRD)]; + _points[SUBTYPE(DMPGRD, 3)] = _points[TYPE(DMPGRD)]; + _points[SUBTYPE(DMPGRD, 4)].setTextColor(QColor(0xff, 0x40, 0x40)); + _points[SUBTYPE(DMPGRD, 4)].setHaloColor(QColor()); + _points[SUBTYPE(DMPGRD, 5)] = _points[TYPE(DMPGRD)]; + _points[SUBTYPE(DMPGRD, 6)] = _points[TYPE(DMPGRD)]; _points[SUBTYPE(I_BUNSTA, 1)] = Point(svg2img(":/POI/fuel-11.svg", ratio), Small); diff --git a/src/map/IMG/style.cpp b/src/map/IMG/style.cpp index 2ceb29bf..c14e4dff 100644 --- a/src/map/IMG/style.cpp +++ b/src/map/IMG/style.cpp @@ -351,7 +351,9 @@ void Style::defaultPolygonStyle() _polygons[0x10307] = Polygon(QBrush(QColor(0xff, 0xff, 0xff))); _polygons[0x10308] = Polygon(QBrush(QColor(0xff, 0xff, 0xff))); _polygons[0x10407] = Polygon(QBrush(QColor(0xa3, 0xa3, 0xa3), - Qt::Dense3Pattern)); + Qt::Dense5Pattern)); + _polygons[0x10408] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), + Qt::Dense5Pattern)); _polygons[0x10409] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), Qt::FDiagPattern)); _polygons[0x10503] = Polygon(QBrush(QColor(0xff, 0x40, 0x40), @@ -382,8 +384,8 @@ void Style::defaultPolygonStyle() << TYPE(0x26) << TYPE(0x0d) << 0x1090a << TYPE(0x0e) << 0x1090b << TYPE(0x0f) << TYPE(0x10) << TYPE(0x11) << TYPE(0x12) << TYPE(0x19) << 0x1090d << TYPE(0x13) << 0x10900 - << 0x10613 /*raster*/ << 0x1060a << 0x10407 << 0x10409 << 0x10503 - << 0x10105; + << 0x10613 /*raster*/ << 0x1060a << 0x10407 << 0x10408 << 0x10409 + << 0x10503 << 0x10105; } void Style::defaultLineStyle(qreal ratio) @@ -497,6 +499,7 @@ void Style::defaultLineStyle(qreal ratio) _lines[0x10405] = Line(QImage(":/marine/pipeline-area-line.png")); _lines[0x10406] = 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[0x10501] = Line(QImage(":/marine/noanchor-line.png")); _lines[0x10502] = Line(QImage(":/marine/nofishing-line.png")); @@ -505,7 +508,7 @@ void Style::defaultLineStyle(qreal ratio) _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[0x10601] = Line(QPen(QColor(0, 0, 0), 1, Qt::SolidLine)); + _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));