diff --git a/src/map/IMG/rastertile.cpp b/src/map/IMG/rastertile.cpp index 12199142..aedf3fa1 100644 --- a/src/map/IMG/rastertile.cpp +++ b/src/map/IMG/rastertile.cpp @@ -26,31 +26,6 @@ using namespace IMG; #define AREA(rect) \ (rect.size().width() * rect.size().height()) -struct Sector -{ - Sector(Light::Color color, quint32 start, quint32 end) - : color(color), start(start), end(end) {} - - bool operator==(const Sector &other) const - { - return (color == other.color && start == other.start && end == other.end); - } - bool operator<(const Sector &other) const - { - if (color == other.color) { - if (start == other.start) - return end < other.end; - else - return start < other.start; - } else - return color < other.color; - } - - Light::Color color; - quint32 start; - quint32 end; -}; - static const QColor textColor(Qt::black); static const QColor haloColor(Qt::white); static const QColor shieldColor(Qt::white); @@ -259,7 +234,7 @@ static QRect lightRect(const QPoint &pos, quint32 range) } void RasterTile::drawSectorLights(QPainter *painter, - const QList &lights) const + const QList &lights) const { for (int i = 0; i < lights.size(); i++) { const MapData::Point *p = lights.at(i); @@ -329,7 +304,7 @@ void RasterTile::drawSectorLights(QPainter *painter, } } -static void removeDuplicitLabel(QList &labels, const QString &text, +static void removeDuplicitLabel(QList &labels, const QString &text, const QRectF &tileRect) { for (int i = 0; i < labels.size(); i++) { @@ -539,7 +514,7 @@ static Light::Color ordinaryLight(const QVector &lights) } void RasterTile::processPoints(QList &points, - QList &textItems, QList &lights, + QList &textItems, QList &lights, QList §orLights) { std::sort(points.begin(), points.end()); diff --git a/src/map/IMG/rastertile.h b/src/map/IMG/rastertile.h index 9d7aaf96..879656a2 100644 --- a/src/map/IMG/rastertile.h +++ b/src/map/IMG/rastertile.h @@ -51,6 +51,32 @@ private: double &ele; }; + struct Sector + { + Sector(Light::Color color, quint32 start, quint32 end) + : color(color), start(start), end(end) {} + + bool operator==(const Sector &other) const + { + return (color == other.color && start == other.start + && end == other.end); + } + bool operator<(const Sector &other) const + { + if (color == other.color) { + if (start == other.start) + return end < other.end; + else + return start < other.start; + } else + return color < other.color; + } + + Light::Color color; + quint32 start; + quint32 end; + }; + void fetchData(QList &polygons, QList &lines, QList &points); QPointF ll2xy(const Coordinates &c) const @@ -70,7 +96,7 @@ private: const QList &lights) const; void processPolygons(const QList &polygons, - QList &textItems); + QList &textItems); void processLines(QList &lines, QList &textItems, const QImage (&arrows)[2]); void processPoints(QList &points,