mirror of
https://github.com/tumic0/GPXSee.git
synced 2024-11-24 03:35:53 +01:00
Compare commits
No commits in common. "cccda7395e2fe6b2ddb6f6f7a3e904b0f2e40e7d" and "f5b0c3f0414830e0543dbdb12e642f2a2ca7a372" have entirely different histories.
cccda7395e
...
f5b0c3f041
@ -23,7 +23,7 @@
|
|||||||
<rule e="way" closed="yes" k="natural" v="rock|stone|bare_rock|bedrock" zoom-min="14">
|
<rule e="way" closed="yes" k="natural" v="rock|stone|bare_rock|bedrock" zoom-min="14">
|
||||||
<area fill="#60000000"/>
|
<area fill="#60000000"/>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="way" closed="yes" k="natural" v="glacier" zoom-min="10">
|
<rule e="way" closed="yes" k="natural" v="glacier" zoom-min="12">
|
||||||
<area fill="#ddf1fd"/>
|
<area fill="#ddf1fd"/>
|
||||||
</rule>
|
</rule>
|
||||||
|
|
||||||
@ -586,27 +586,18 @@
|
|||||||
<rule e="node" k="name" v="*">
|
<rule e="node" k="name" v="*">
|
||||||
<symbol id="peak" src=":/POI/mountain-11.svg" symbol-width="11" priority="10"/>
|
<symbol id="peak" src=":/POI/mountain-11.svg" symbol-width="11" priority="10"/>
|
||||||
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="2" symbol-id="peak"/>
|
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="2" symbol-id="peak"/>
|
||||||
<rule e="node" k="*" v="*" zoom-min="14">
|
|
||||||
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="ele" stroke="#FFFFFF" stroke-width="2" symbol-id="peak" priority="-1"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="node" k="natural" v="saddle" zoom-min="13">
|
<rule e="node" k="natural" v="saddle" zoom-min="13">
|
||||||
<rule e="node" k="name" v="*">
|
<rule e="node" k="name" v="*">
|
||||||
<symbol id="saddle" src=":/symbols/saddle.svg" symbol-width="9" symbol-height="11" priority="9"/>
|
<symbol id="saddle" src=":/symbols/saddle.svg" symbol-width="9" symbol-height="11" priority="9"/>
|
||||||
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="2" symbol-id="saddle"/>
|
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="2" symbol-id="saddle"/>
|
||||||
<rule e="node" k="*" v="*" zoom-min="14">
|
|
||||||
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="ele" stroke="#FFFFFF" stroke-width="2" symbol-id="saddle" priority="-1"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="node" k="natural" v="volcano" zoom-min="13">
|
<rule e="node" k="natural" v="volcano" zoom-min="13">
|
||||||
<rule e="node" k="name" v="*">
|
<rule e="node" k="name" v="*">
|
||||||
<symbol id="volcano" src=":/POI/volcano-11.svg" symbol-width="11" priority="10"/>
|
<symbol id="volcano" src=":/POI/volcano-11.svg" symbol-width="11" priority="10"/>
|
||||||
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="2" symbol-id="volcano"/>
|
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="name" stroke="#FFFFFF" stroke-width="2" symbol-id="volcano"/>
|
||||||
<rule e="node" k="*" v="*" zoom-min="14">
|
|
||||||
<caption fill="#000000" font-size="10" font-family="serif" font-style="italic" k="ele" stroke="#FFFFFF" stroke-width="2" symbol-id="volcano" priority="-1"/>
|
|
||||||
</rule>
|
|
||||||
</rule>
|
</rule>
|
||||||
</rule>
|
</rule>
|
||||||
<rule e="node" k="waterway" v="waterfall" zoom-min="15">
|
<rule e="node" k="waterway" v="waterfall" zoom-min="15">
|
||||||
|
@ -85,7 +85,7 @@ void RasterTile::processLabels(const QList<MapData::Point> &points,
|
|||||||
const MapData::Point &point = points.at(i);
|
const MapData::Point &point = points.at(i);
|
||||||
const Style::TextRender *ti = 0;
|
const Style::TextRender *ti = 0;
|
||||||
const Style::Symbol *si = 0;
|
const Style::Symbol *si = 0;
|
||||||
QList<const QByteArray *> ll;
|
const QByteArray *lbl = 0;
|
||||||
|
|
||||||
for (int j = 0; j < symbols.size(); j++) {
|
for (int j = 0; j < symbols.size(); j++) {
|
||||||
const Style::Symbol *ri = symbols.at(j);
|
const Style::Symbol *ri = symbols.at(j);
|
||||||
@ -98,23 +98,17 @@ void RasterTile::processLabels(const QList<MapData::Point> &points,
|
|||||||
for (int j = 0; j < labels.size(); j++) {
|
for (int j = 0; j < labels.size(); j++) {
|
||||||
const Style::TextRender *ri = labels.at(j);
|
const Style::TextRender *ri = labels.at(j);
|
||||||
if (ri->rule().match(point.center(), point.tags)) {
|
if (ri->rule().match(point.center(), point.tags)) {
|
||||||
const QByteArray *lbl;
|
|
||||||
if ((lbl = label(ri->key(), point.tags))) {
|
if ((lbl = label(ri->key(), point.tags))) {
|
||||||
if (!si) {
|
if (!si || si->id() == ri->symbolId()) {
|
||||||
ti = ri;
|
ti = ri;
|
||||||
ll.append(lbl);
|
|
||||||
break;
|
break;
|
||||||
} else if (si->id() == ri->symbolId()) {
|
|
||||||
if (!ti)
|
|
||||||
ti = ri;
|
|
||||||
ll.append(lbl);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ti || si)
|
if (ti || si)
|
||||||
items.append(Label(&point, ll, si, ti));
|
items.append(Label(&point, lbl, si, ti));
|
||||||
}
|
}
|
||||||
|
|
||||||
std::sort(items.begin(), items.end());
|
std::sort(items.begin(), items.end());
|
||||||
|
@ -44,9 +44,9 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct Label {
|
struct Label {
|
||||||
Label(const MapData::Point *p, const QList<const QByteArray *> lbl,
|
Label(const MapData::Point *p, const QByteArray *lbl,
|
||||||
const Style::Symbol *si, const Style::TextRender *ti)
|
const Style::Symbol *si, const Style::TextRender *ti)
|
||||||
: point(p), ti(ti), si(si), lbl(lbl)
|
: point(p), lbl(lbl), ti(ti), si(si)
|
||||||
{
|
{
|
||||||
Q_ASSERT(si || ti);
|
Q_ASSERT(si || ti);
|
||||||
}
|
}
|
||||||
@ -61,9 +61,9 @@ private:
|
|||||||
int priority() const {return si ? si->priority() : ti->priority();}
|
int priority() const {return si ? si->priority() : ti->priority();}
|
||||||
|
|
||||||
const MapData::Point *point;
|
const MapData::Point *point;
|
||||||
|
const QByteArray *lbl;
|
||||||
const Style::TextRender *ti;
|
const Style::TextRender *ti;
|
||||||
const Style::Symbol *si;
|
const Style::Symbol *si;
|
||||||
QList<const QByteArray *> lbl;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
struct LineLabel {
|
struct LineLabel {
|
||||||
@ -170,28 +170,15 @@ private:
|
|||||||
class PointItem : public TextPointItem
|
class PointItem : public TextPointItem
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PointItem(const QPoint &point, const QList<const QByteArray *> &lbl,
|
PointItem(const QPoint &point, const QByteArray *label,
|
||||||
const QFont *font, const QImage *img, const QColor *color,
|
const QFont *font, const QImage *img, const QColor *color,
|
||||||
const QColor *haloColor) : TextPointItem(point, label(lbl),
|
const QColor *haloColor) : TextPointItem(point,
|
||||||
font, img, color, haloColor, 0) {}
|
label ? new QString(*label) : 0, font, img, color, haloColor, 0) {}
|
||||||
PointItem(const QPoint &point, const QByteArray *label,
|
PointItem(const QPoint &point, const QByteArray *label,
|
||||||
const QFont *font, const QColor *color, const QColor *bgColor)
|
const QFont *font, const QColor *color, const QColor *bgColor)
|
||||||
: TextPointItem(point, label ? new QString(*label) : 0, font, 0,
|
: TextPointItem(point, label ? new QString(*label) : 0, font, 0,
|
||||||
color, 0, bgColor) {}
|
color, 0, bgColor) {}
|
||||||
~PointItem() {delete _text;}
|
~PointItem() {delete _text;}
|
||||||
|
|
||||||
private:
|
|
||||||
static QString *label(const QList<const QByteArray*> &ll)
|
|
||||||
{
|
|
||||||
if (ll.isEmpty())
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
QString *ret = new QString(*ll.first());
|
|
||||||
for (int i = 1; i < ll.size(); i++)
|
|
||||||
ret->append("\n" + *ll.at(i));
|
|
||||||
|
|
||||||
return ret;
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class PathItem : public TextPathItem
|
class PathItem : public TextPathItem
|
||||||
|
Loading…
Reference in New Issue
Block a user