From 7900e88907b04c48b94a5645fb87c7f57f10ff85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20T=C5=AFma?= Date: Sun, 4 Dec 2022 23:09:59 +0100 Subject: [PATCH] Some more ENC style improvements --- gpxsee.qrc | 2 ++ icons/map/marine/beacon.png | Bin 232 -> 4855 bytes icons/map/marine/distance-mark-land.png | Bin 0 -> 147 bytes icons/map/marine/windmotor.png | Bin 0 -> 326 bytes src/map/ENC/rastertile.cpp | 39 ++++++++++++------------ src/map/ENC/style.cpp | 7 ++++- 6 files changed, 28 insertions(+), 20 deletions(-) create mode 100644 icons/map/marine/distance-mark-land.png create mode 100644 icons/map/marine/windmotor.png diff --git a/gpxsee.qrc b/gpxsee.qrc index d08f044b..c5a53a67 100644 --- a/gpxsee.qrc +++ b/gpxsee.qrc @@ -177,6 +177,7 @@ icons/map/marine/fence-line.png icons/map/marine/crane.png icons/map/marine/distance-mark.png + icons/map/marine/distance-mark-land.png icons/map/marine/conveyor-line.png icons/map/marine/pipeline-overhead.png icons/map/marine/coast-guard.png @@ -189,6 +190,7 @@ icons/map/marine/entry-prohibited-line.png icons/map/marine/cable-area-line.png icons/map/marine/pipeline-area-line.png + icons/map/marine/windmotor.png diff --git a/icons/map/marine/beacon.png b/icons/map/marine/beacon.png index c0e2e145ff1c7cc26167d3d6c2de947e032b4c06..cb5ceef4d947369791298d5bcb4450bdf70d2b76 100644 GIT binary patch literal 4855 zcmeHKX;2f{77mJl2qPd4%eeFeQ4~Ar&O#Om2w@e1G2o6!r@I4DvXC?odFm(%Dy6tD z47iLw0TF23Z&I(6v_k=qGoAHh%_h_ zG@7B|$+~f?Za_8}O@hGXv7uH=?!+SO62Ik5)9cTv4?GYzvy`+Xy7XJ3CaOnlAXVbF_3i+03hEWFtJxXmH`)Tukvn~&}rynIwNc9I#$*4#K4 z>FpaQZq1Mn#C#SKV$X{Fo({edmyz;#-nm~E=O4-2`p5Zx=6A>EKHXli&1KL1^<(-* zMa5h>{>No@VfFeu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5seP7f;4$cZ8hHp?_)+!i571_+B8>l6@} z>>wARSVv-%Mi-^gB#7w7kRYRH=d=VICjz6e0E{95DZ*k2QI-(lM6pmI0tS3f1Pr?1 zHH1wlq*hX?X*-|`Tp9;`phWNJTAkz``~Tl;H*(sYy{$aE-#7~Y-XYkl94sZKb`mU_^m}kFe=!u6L&L&nB z7^m-h&*gmb z^{-*43G-bao^bVOTCw7^*1{sAMVjv&7aMEk=1x>P2bFs`_u^R6-lVx?+04JoGR7Sm L7!k0?KQ`^(*J~l; delta 186 zcmV;r07d`zCFlW=BM<-vVoOIv0B-=n0FHP}3A2+u5*UAoNkl418 z3+S9eW8H;Q=rpX$xPiMU6?A(Bkyy>IFtH{pB#L>vZ|46dZ)P%li53T3aEkoIpriD5 zZup5xDfK9w%RBvLX`kd>?vNR-SYv`s=fyVlMh6`2r86{%JOKu zEO1iE=-yW=jiYv)o&Az))9ttYIL5ew!Diyb>uPt>g4ewMwXgG;=(n5#P5WET`JxTk zVfD*1wf>!A^Nu*Y?V!OT)`q?f-yH7-zP>52`$p4}7EzXiZL@FA$T3K?a~FMlV69phJF!WRD1uv-S@{9vnuBu-I^1;%>Ju|BL6fa zgHPWs-+y!KhV0xWY6c6FJ~!;rJHe3fao+T|b7vg%zQW)dcrGpWdiSmc8eK|{cvmj- VncKN}mLn)QJYD@<);T3K0RX&niG2V7 literal 0 HcmV?d00001 diff --git a/src/map/ENC/rastertile.cpp b/src/map/ENC/rastertile.cpp index 240cfe9d..c5e9d1cb 100644 --- a/src/map/ENC/rastertile.cpp +++ b/src/map/ENC/rastertile.cpp @@ -208,6 +208,26 @@ void RasterTile::processPoints(QList &textItems) std::sort(_points.begin(), _points.end(), pointLess); + for (int i = 0; i < _polygons.size(); i++) { + const MapData::Poly *poly = _polygons.at(i); + uint type = poly->type()>>16; + + if (!(type == HRBFAC || type == I_TRNBSN)) + continue; + const Style::Point &style = s.point(poly->type()); + const QImage *img = style.img().isNull() ? 0 : &style.img(); + if (!img) + continue; + + TextPointItem *item = new TextPointItem( + ll2xy(centroid(poly->path().first())).toPoint(), + 0, 0, img, 0, 0, 0, 0); + if (item->isValid() && !item->collides(textItems)) + textItems.append(item); + else + delete item; + } + for (int i = 0; i < _points.size(); i++) { const MapData::Point *point = _points.at(i); const Style::Point &style = s.point(point->type()); @@ -229,25 +249,6 @@ void RasterTile::processPoints(QList &textItems) else delete item; } - - for (int i = 0; i < _polygons.size(); i++) { - const MapData::Poly *poly = _polygons.at(i); - - if (poly->type()>>16 == HRBFAC) { - const Style::Point &style = s.point(poly->type()); - const QImage *img = style.img().isNull() ? 0 : &style.img(); - if (!img) - continue; - - TextPointItem *item = new TextPointItem( - ll2xy(centroid(poly->path().first())).toPoint(), 0, 0, - &style.img(), 0, 0, 0, 0); - if (item->isValid() && !item->collides(textItems)) - textItems.append(item); - else - delete item; - } - } } void RasterTile::processLines(QList &textItems) diff --git a/src/map/ENC/style.cpp b/src/map/ENC/style.cpp index a24fa10e..a8dbe949 100644 --- a/src/map/ENC/style.cpp +++ b/src/map/ENC/style.cpp @@ -94,7 +94,7 @@ void Style::defaultPolygonStyle() Qt::Dense7Pattern)); _polygons[TYPE(I_LOKBSN)] = Polygon(QBrush(QColor("#333333"), Qt::Dense7Pattern)); - _polygons[TYPE(TUNNEL)] = Polygon(Qt::NoBrush, QPen(QColor("#a3a3a3"), 1, + _polygons[TYPE(TUNNEL)] = Polygon(Qt::NoBrush, QPen(QColor("#a58140"), 1.5, Qt::DashLine)); _polygons[TYPE(CBLARE)] = Polygon(QImage(":/marine/cable-area-line.png")); _polygons[TYPE(PIPARE)] = Polygon(QImage(":/marine/pipeline-area-line.png")); @@ -190,6 +190,7 @@ void Style::defaultPointStyle() _points[SUBTYPE(LNDMRK, 9)] = Point(QImage(":/marine/monument.png")); _points[SUBTYPE(LNDMRK, 20)] = Point(QImage(":/marine/church.png")); _points[SUBTYPE(LNDMRK, 17)] = Point(QImage(":/marine/tower.png")); + _points[SUBTYPE(LNDMRK, 19)] = Point(QImage(":/marine/windmotor.png")); _points[TYPE(LNDELV)] = Point(QImage(":/marine/triangulation-point.png")); _points[TYPE(OBSTRN)] = Point(QImage(":/marine/obstruction.png"), Small); _points[SUBTYPE(WRECKS, 1)] = Point(QImage(":/marine/wreck.png"), Small); @@ -224,6 +225,10 @@ void Style::defaultPointStyle() _points[SUBTYPE(I_DISMAR, 1)] = Point(QImage(":/marine/distance-mark.png")); _points[SUBTYPE(I_DISMAR, 1)].setTextColor(QColor("#ffffff")); _points[SUBTYPE(I_DISMAR, 1)].setTextFontSize(Small); + _points[SUBTYPE(I_DISMAR, 2)] = Point(QImage(":/marine/distance-mark-land.png")); + _points[SUBTYPE(I_DISMAR, 2)].setTextFontSize(Small); + _points[SUBTYPE(I_DISMAR, 3)] = Point(QImage(":/marine/distance-mark-land.png")); + _points[SUBTYPE(I_DISMAR, 3)].setTextFontSize(Small); _points[TYPE(CGUSTA)] = Point(QImage(":/marine/coast-guard.png")); _points[TYPE(RDOSTA)] = Point(QImage(":/marine/radio.png")); _points[TYPE(RADSTA)] = Point(QImage(":/marine/radar.png"));