Compare commits

..

No commits in common. "b36fb5fa9272d56d342a9d6793b50121b9c5ce62" and "8cf73b5bb5047a678eb306d165b46750f09a153a" have entirely different histories.

3 changed files with 3 additions and 14 deletions

View File

@ -1,4 +1,4 @@
version: 2.6.{build}
version: 2.5.{build}
configuration:
- Release

View File

@ -2,7 +2,7 @@ TARGET = pbf
TEMPLATE = lib
CONFIG += plugin
QT += gui
VERSION = 2.6
VERSION = 2.5
PROTOS = protobuf/vector_tile.proto
include(protobuf/vector_tile.pri)

View File

@ -171,12 +171,6 @@ static QList<QPolygonF> polyLines(const QPainterPath &path, const QRectF &rect)
return lines;
}
static qreal diff(qreal a1, qreal a2)
{
qreal d = qAbs(a1 - a2);
return (d > 180) ? 360 - d : d;
}
static QPainterPath textPath(const QPainterPath &path, qreal textWidth,
qreal maxAngle, qreal charWidth, const QRectF &tileRect)
{
@ -195,16 +189,11 @@ static QPainterPath textPath(const QPainterPath &path, qreal textWidth,
qreal sl = l.length();
qreal a = l.angle();
if (sl < charWidth) {
if ((sl < charWidth) || (j > 1 && qAbs(angle - a) > maxAngle)) {
if (length > textWidth)
return subpath(pl, last, j - 1, length - textWidth);
last = j;
length = 0;
} else if (j > 1 && diff(angle, a) > maxAngle) {
if (length > textWidth)
return subpath(pl, last, j - 1, length - textWidth);
last = j - 1;
length = sl;
} else
length += sl;