Script 'mail_helper' called by obssrc
Hello community,
here is the log from the commit of package libqt5-qtpbfimageformat for
openSUSE:Factory checked in at 2023-10-11 23:54:29
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/libqt5-qtpbfimageformat (Old)
and /work/SRC/openSUSE:Factory/.libqt5-qtpbfimageformat.new.1807 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "libqt5-qtpbfimageformat"
Wed Oct 11 23:54:29 2023 rev:2 rq:1116749 version:2.5
Changes:
--------
---
/work/SRC/openSUSE:Factory/libqt5-qtpbfimageformat/libqt5-qtpbfimageformat.changes
2023-07-27 16:52:26.886370097 +0200
+++
/work/SRC/openSUSE:Factory/.libqt5-qtpbfimageformat.new.1807/libqt5-qtpbfimageformat.changes
2023-10-12 11:45:21.252039996 +0200
@@ -1,0 +2,7 @@
+Tue Oct 10 23:11:44 CEST 2023 - [email protected]
+
+- Update to version 2.5
+ * Fixed/improved path label layout algorithm.
+ * Added Windows dll info.
+
+-------------------------------------------------------------------
Old:
----
QtPBFImagePlugin-2.4.tar.gz
New:
----
QtPBFImagePlugin-2.5.tar.gz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ libqt5-qtpbfimageformat.spec ++++++
--- /var/tmp/diff_new_pack.6toI8y/_old 2023-10-12 11:45:21.908063660 +0200
+++ /var/tmp/diff_new_pack.6toI8y/_new 2023-10-12 11:45:21.908063660 +0200
@@ -23,8 +23,8 @@
%else
Name: libqt5-qtpbfimageformat
%endif
-Version: 2.4
-Release: 3
+Version: 2.5
+Release: 1
Summary: Qt 5 PBF Image Format Plugin
License: LGPL-3.0-only
Group: Development/Libraries/X11
++++++ QtPBFImagePlugin-2.4.tar.gz -> QtPBFImagePlugin-2.5.tar.gz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/QtPBFImagePlugin-2.4/.appveyor.yml
new/QtPBFImagePlugin-2.5/.appveyor.yml
--- old/QtPBFImagePlugin-2.4/.appveyor.yml 1970-01-01 01:00:00.000000000
+0100
+++ new/QtPBFImagePlugin-2.5/.appveyor.yml 2023-10-10 23:04:39.000000000
+0200
@@ -0,0 +1,32 @@
+version: 2.5.{build}
+
+configuration:
+ - Release
+
+image:
+ - Visual Studio 2022
+
+environment:
+ VCPKGDIR: C:\tools\vcpkg\installed\x64-windows-static-md
+ matrix:
+ - QTDIR: C:\Qt\5.15\msvc2019_64
+ - QTDIR: C:\Qt\6.5\msvc2019_64
+
+install:
+- cmd: |-
+ set PATH=%QTDIR%\bin;%VCPKGDIR%\tools\protobuf;%PATH%
+ call "C:\Program Files\Microsoft Visual
Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat
+ vcpkg install protobuf:x64-windows-static-md
+ vcpkg install zlib:x64-windows-static-md
+ copy /y %VCPKGDIR%\lib\zlib.lib %VCPKGDIR%\lib\zlibstatic.lib
+
+build_script:
+- cmd: |-
+ qmake PROTOBUF=%VCPKGDIR% ZLIB=%VCPKGDIR% pbfplugin.pro
+ nmake release
+
+artifacts:
+- path: release\pbf2.dll
+
+cache:
+- C:\tools\vcpkg\installed\
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/QtPBFImagePlugin-2.4/.github/workflows/linux.yml
new/QtPBFImagePlugin-2.5/.github/workflows/linux.yml
--- old/QtPBFImagePlugin-2.4/.github/workflows/linux.yml 2023-05-05
19:15:36.000000000 +0200
+++ new/QtPBFImagePlugin-2.5/.github/workflows/linux.yml 2023-10-10
23:04:39.000000000 +0200
@@ -11,7 +11,7 @@
runs-on: ubuntu-20.04
steps:
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install dependencies
run: |
sudo apt-get update
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/QtPBFImagePlugin-2.4/.github/workflows/osx.yml
new/QtPBFImagePlugin-2.5/.github/workflows/osx.yml
--- old/QtPBFImagePlugin-2.4/.github/workflows/osx.yml 2023-05-05
19:15:36.000000000 +0200
+++ new/QtPBFImagePlugin-2.5/.github/workflows/osx.yml 2023-10-10
23:04:39.000000000 +0200
@@ -6,17 +6,32 @@
- master
jobs:
- build:
- name: QtPBFImagePlugin
- runs-on: macos-10.15
+ qt5:
+ name: QtPBFImagePlugin Qt5 build
+ runs-on: macos-latest
steps:
- name: Set environment variables
- run: echo "PATH=/usr/local/opt/qt@5/bin:$PATH" >> $GITHUB_ENV
+ run: echo
"PATH=/usr/local/opt/qt@5/bin:/usr/local/opt/protobuf@21/bin:$PATH" >>
$GITHUB_ENV
- name: Checkout
- uses: actions/checkout@v2
+ uses: actions/checkout@v3
- name: Install dependencies
- run: brew install qt5 protobuf
+ run: brew install qt@5 protobuf@21
- name: Configure build
- run: qmake PROTOBUF=/usr/local pbfplugin.pro
+ run: qmake PROTOBUF=/usr/local/opt/protobuf@21 pbfplugin.pro
+ - name: Build project
+ run: make -j3
+
+ qt6:
+ name: QtPBFImagePlugin Qt6 build
+ runs-on: macos-latest
+ steps:
+ - name: Set environment variables
+ run: echo
"PATH=/usr/local/opt/qt@6/bin:/usr/local/opt/protobuf@21/bin:$PATH" >>
$GITHUB_ENV
+ - name: Checkout
+ uses: actions/checkout@v3
+ - name: Install dependencies
+ run: brew install qt@6 protobuf@21
+ - name: Configure build
+ run: qmake PROTOBUF=/usr/local/opt/protobuf@21 pbfplugin.pro
- name: Build project
run: make -j3
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/QtPBFImagePlugin-2.4/pbfplugin.pro
new/QtPBFImagePlugin-2.5/pbfplugin.pro
--- old/QtPBFImagePlugin-2.4/pbfplugin.pro 2023-05-05 19:15:36.000000000
+0200
+++ new/QtPBFImagePlugin-2.5/pbfplugin.pro 2023-10-10 23:04:39.000000000
+0200
@@ -2,6 +2,7 @@
TEMPLATE = lib
CONFIG += plugin
QT += gui
+VERSION = 2.5
PROTOS = protobuf/vector_tile.proto
include(protobuf/vector_tile.pri)
@@ -47,6 +48,10 @@
$$ZLIB/include
LIBS += $$PROTOBUF/lib/libprotobuf-lite.lib \
$$ZLIB/lib/zlibstatic.lib
+
+ QMAKE_TARGET_PRODUCT = QtPBFImagePlugin
+ QMAKE_TARGET_DESCRIPTION = Qt $$QT_VERSION MVT/PBF image plugin
+ QMAKE_TARGET_COPYRIGHT = Copyright (c) 2023 Martin Tuma
}
macx {
INCLUDEPATH += $$PROTOBUF/include
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/QtPBFImagePlugin-2.4/src/gzip.cpp
new/QtPBFImagePlugin-2.5/src/gzip.cpp
--- old/QtPBFImagePlugin-2.4/src/gzip.cpp 2023-05-05 19:15:36.000000000
+0200
+++ new/QtPBFImagePlugin-2.5/src/gzip.cpp 2023-10-10 23:04:39.000000000
+0200
@@ -6,7 +6,7 @@
QByteArray Gzip::uncompress(QIODevice *device, int limit)
{
- int ret;
+ int ret = Z_STREAM_END;
z_stream strm;
unsigned char in[CHUNK];
unsigned char out[CHUNK];
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/QtPBFImagePlugin-2.4/src/textitem.cpp
new/QtPBFImagePlugin-2.5/src/textitem.cpp
--- old/QtPBFImagePlugin-2.4/src/textitem.cpp 2023-05-05 19:15:36.000000000
+0200
+++ new/QtPBFImagePlugin-2.5/src/textitem.cpp 2023-10-10 23:04:39.000000000
+0200
@@ -21,14 +21,14 @@
ratio = 1.0;
// Greek & Cyrilic
else if (cp >= 0x03FF && cp <= 0x04FF) {
- ratio = (_font.capitalization() == QFont::AllUppercase) ? 0.80
: 0.73;
+ ratio = (_font.capitalization() == QFont::AllUppercase) ? 0.80
: 0.70;
if (_font.bold())
ratio *= 1.1;
if (_font.italic())
ratio *= 0.9;
// The rest (Latin scripts, Arabic, ...)
} else {
- ratio = (_font.capitalization() == QFont::AllUppercase) ? 0.75
: 0.63;
+ ratio = (_font.capitalization() == QFont::AllUppercase) ? 0.75
: 0.60;
if (_font.bold())
ratio *= 1.1;
if (_font.italic())
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/QtPBFImagePlugin-2.4/src/textpathitem.cpp
new/QtPBFImagePlugin-2.5/src/textpathitem.cpp
--- old/QtPBFImagePlugin-2.4/src/textpathitem.cpp 2023-05-05
19:15:36.000000000 +0200
+++ new/QtPBFImagePlugin-2.5/src/textpathitem.cpp 2023-10-10
23:04:39.000000000 +0200
@@ -9,23 +9,20 @@
#define INTERSECTS intersects
#endif // QT 5.15
-static bool intersection(const QLineF &line, const QRectF &rect,
- QPointF *p)
+static void swap(const QLineF &line, QPointF *p1, QPointF *p2)
{
- if (line.INTERSECTS(QLineF(rect.topLeft(), rect.topRight()), p)
- == QLineF::BoundedIntersection)
- return true;
- if (line.INTERSECTS(QLineF(rect.topLeft(), rect.bottomLeft()), p)
- == QLineF::BoundedIntersection)
- return true;
- if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
- == QLineF::BoundedIntersection)
- return true;
- if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.topRight()), p)
- == QLineF::BoundedIntersection)
- return true;
- return false;
+ QPointF lp1(line.p1());
+ QPointF lp2(line.p2());
+
+ if ((lp1.rx() < lp2.rx() && p1->rx() > p2->rx())
+ || (lp1.ry() < lp2.ry() && p1->ry() > p2->ry())
+ || (lp1.rx() > lp2.rx() && p1->rx() < p2->rx())
+ || (lp1.ry() > lp2.ry() && p1->ry() < p2->ry())) {
+ QPointF tmp(*p2);
+ *p2 = *p1;
+ *p1 = tmp;
+ }
}
static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p1,
@@ -38,20 +35,26 @@
p = p2;
if (line.INTERSECTS(QLineF(rect.topLeft(), rect.bottomLeft()), p)
== QLineF::BoundedIntersection) {
- if (p == p2)
+ if (p == p2) {
+ swap(line, p1, p2);
return true;
+ }
p = p2;
}
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
== QLineF::BoundedIntersection) {
- if (p == p2)
+ if (p == p2) {
+ swap(line, p1, p2);
return true;
+ }
p = p2;
}
if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.topRight()), p)
== QLineF::BoundedIntersection) {
- if (p == p2)
+ if (p == p2) {
+ swap(line, p1, p2);
return true;
+ }
}
Q_ASSERT(p != p2);
@@ -59,22 +62,42 @@
return false;
}
-static QPainterPath subpath(const QList<QLineF> &lines, int start, int end,
+static bool intersection(const QLineF &line, const QRectF &rect, QPointF *p)
+{
+ if (line.INTERSECTS(QLineF(rect.topLeft(), rect.topRight()), p)
+ == QLineF::BoundedIntersection)
+ return true;
+ if (line.INTERSECTS(QLineF(rect.topLeft(), rect.bottomLeft()), p)
+ == QLineF::BoundedIntersection)
+ return true;
+ if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.bottomLeft()), p)
+ == QLineF::BoundedIntersection)
+ return true;
+ if (line.INTERSECTS(QLineF(rect.bottomRight(), rect.topRight()), p)
+ == QLineF::BoundedIntersection)
+ return true;
+
+ return false;
+}
+
+static QPainterPath subpath(const QPolygonF &path, int start, int end,
qreal cut)
{
qreal ss = 0, es = 0;
int si = start, ei = end;
- for (int i = start; i <= end; i++) {
- qreal len = lines.at(i).length();
+ for (int i = start; i < end; i++) {
+ QLineF l(path.at(i), path.at(i+1));
+ qreal len = l.length();
if (ss + len < cut / 2) {
ss += len;
si++;
} else
break;
}
- for (int i = end; i >= start; i--) {
- qreal len = lines.at(i).length();
+ for (int i = end; i > start; i--) {
+ QLineF l(path.at(i), path.at(i-1));
+ qreal len = l.length();
if (es + len < cut / 2) {
es += len;
ei--;
@@ -82,98 +105,106 @@
break;
}
- QLineF sl(lines.at(si).p2(), lines.at(si).p1());
+ QLineF sl(path.at(si+1), path.at(si));
sl.setLength(sl.length() - (cut / 2 - ss));
- QLineF el(lines.at(ei));
+ QLineF el(path.at(ei-1), path.at(ei));
el.setLength(el.length() - (cut / 2 - es));
QPainterPath p(sl.p2());
- for (int i = si; i <= ei; i++)
- p.lineTo(lines.at(i).p2());
- p.setElementPositionAt(p.elementCount() - 1, el.p2().x(), el.p2().y());
+ for (int i = si + 1; i < ei; i++)
+ p.lineTo(path.at(i));
+ p.lineTo(el.p2());
return p;
}
-static QList<QLineF> lineString(const QPainterPath &path,
- const QRectF &boundingRect)
+static QList<QPolygonF> polyLines(const QPainterPath &path, const QRectF &rect)
{
- QList<QLineF> lines;
- int start = -1, end = -1;
-
-
- for (int i = 0; i < path.elementCount(); i++) {
- if (boundingRect.contains(path.elementAt(i))) {
- start = i;
- break;
- }
- }
- for (int i = path.elementCount() - 1; i >= 0; i--) {
- if (boundingRect.contains(path.elementAt(i))) {
- end = i;
- break;
- }
- }
-
- if (start < 0) {
- QPointF p1, p2;
+ QList<QPolygonF> lines;
+ QPolygonF line;
+ bool lastIn = rect.contains(path.elementAt(0));
+
+ for (int i = 1; i < path.elementCount(); i++) {
+ if (rect.contains(path.elementAt(i))) {
+ if (lastIn) {
+ if (line.isEmpty())
+ line.append(path.elementAt(i-1));
+ line.append(path.elementAt(i));
+ } else {
+ QPointF p;
+ QLineF l(path.elementAt(i-1),
path.elementAt(i));
+
+ if (intersection(l, rect, &p))
+ line.append(p);
+ line.append(path.elementAt(i));
+ }
- for (int i = 1; i < path.elementCount(); i++) {
+ lastIn = true;
+ } else {
QLineF l(path.elementAt(i-1), path.elementAt(i));
- if (intersection(l, boundingRect, &p1, &p2)) {
- lines.append(QLineF(p1, p2));
- break;
+
+ if (lastIn) {
+ QPointF p;
+ if (line.isEmpty())
+ line.append(path.elementAt(i-1));
+ if (intersection(l, rect, &p))
+ line.append(p);
+ lines.append(line);
+ line.clear();
+ } else {
+ QPointF p1, p2;
+ if (intersection(l, rect, &p1, &p2)) {
+ line.append(p1);
+ line.append(p2);
+ lines.append(line);
+ line.clear();
+ }
}
- }
- } else {
- QPointF p;
- if (start > 0) {
- QLineF l(path.elementAt(start-1),
path.elementAt(start));
- if (intersection(l, boundingRect, &p))
- lines.append(QLineF(p, path.elementAt(start)));
- }
- for (int i = start + 1; i <= end; i++)
- lines.append(QLineF(path.elementAt(i-1),
path.elementAt(i)));
- if (end < path.elementCount() - 1) {
- QLineF l(path.elementAt(end), path.elementAt(end+1));
- if (intersection(l, boundingRect, &p))
- lines.append(QLineF(path.elementAt(end), p));
+ lastIn = false;
}
}
+ if (!line.isEmpty())
+ lines.append(line);
+
return lines;
}
static QPainterPath textPath(const QPainterPath &path, qreal textWidth,
qreal maxAngle, qreal charWidth, const QRectF &tileRect)
{
- QList<QLineF> lines(lineString(path, tileRect));
- if (lines.isEmpty())
+ if (path.isEmpty())
return QPainterPath();
- qreal length = 0;
- qreal angle = lines.first().angle();
- int last = 0;
+
+ QList<QPolygonF> lines(polyLines(path, tileRect));
for (int i = 0; i < lines.size(); i++) {
- qreal sl = lines.at(i).length();
- qreal a = lines.at(i).angle();
+ const QPolygonF &pl = lines.at(i);
+ qreal angle = 0, length = 0;
+ int last = 0;
+
+ for (int j = 1; j < pl.size(); j ++) {
+ QLineF l(pl.at(j-1), pl.at(j));
+ qreal sl = l.length();
+ qreal a = l.angle();
+
+ 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
+ length += sl;
- if (!tileRect.contains(lines.at(i).p2()) || sl < charWidth
- || qAbs(angle - a) > maxAngle) {
- if (length > textWidth)
- return subpath(lines, last, i - 1, length -
textWidth);
- last = i;
- length = 0;
- } else
- length += sl;
+ angle = a;
+ }
- angle = a;
+ if (length > textWidth)
+ return subpath(pl, last, pl.size() - 1, length -
textWidth);
}
- return (length > textWidth)
- ? subpath(lines, last, lines.size() - 1, length - textWidth)
- : QPainterPath();
+ return QPainterPath();
}
static bool reverse(const QPainterPath &path)
@@ -208,9 +239,6 @@
void TextPathItem::paint(QPainter *painter) const
{
- //painter->setPen(Qt::red);
- //painter->drawPath(_shape);
-
QFontMetrics fm(font());
int textWidth = fm.boundingRect(text()).width();
@@ -259,4 +287,9 @@
int width = fm.horizontalAdvance(text().at(i));
percent += ((qreal)width / (qreal)textWidth) * factor;
}
+
+ //painter->setBrush(Qt::NoBrush);
+ //painter->setPen(Qt::red);
+ //painter->setRenderHint(QPainter::Antialiasing, false);
+ //painter->drawPath(_shape);
}
++++++ debian.changelog ++++++
--- /var/tmp/diff_new_pack.6toI8y/_old 2023-10-12 11:45:22.072069577 +0200
+++ /var/tmp/diff_new_pack.6toI8y/_new 2023-10-12 11:45:22.076069720 +0200
@@ -1,3 +1,10 @@
+qt5-pbf-image-plugin (2.5) stable; urgency=low
+
+ * Fixed/improved path label layout algorithm.
+ * Added Windows dll info.
+
+ -- Martin Tuma <[email protected]> Tue, 10 Oct 2023 23:15:30 +0200
+
qt5-pbf-image-plugin (2.4) stable; urgency=low
* Fixed tile transparency issue.
++++++ qtpbfplugin.dsc ++++++
--- /var/tmp/diff_new_pack.6toI8y/_old 2023-10-12 11:45:22.164072895 +0200
+++ /var/tmp/diff_new_pack.6toI8y/_new 2023-10-12 11:45:22.176073328 +0200
@@ -1,10 +1,10 @@
Format: 1.0
Source: qt5-pbf-image-plugin
-Version: 2.4-1
+Version: 2.5-1
Binary: qt5-pbf-image-plugin
Maintainer: Martin Tuma <[email protected]>
Architecture: any
Build-Depends: debhelper (>= 9), qtbase5-dev, qtbase5-dev-tools, qt5-qmake,
libprotobuf-dev, protobuf-compiler, zlib1g-dev
Files:
- 00000000000000000000000000000000 0 QtPBFImagePlugin-2.4.tar.gz
+ 00000000000000000000000000000000 0 QtPBFImagePlugin-2.5.tar.gz