[poppler] 2 commits - .gitlab-ci.yml poppler/Annot.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Nov 25 18:12:57 UTC 2020


 .gitlab-ci.yml   |    4 ++--
 poppler/Annot.cc |   22 ++++++++++++++++------
 2 files changed, 18 insertions(+), 8 deletions(-)

New commits:
commit 1fba0c2bd540e6100b9a64483101b135bfbcee13
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 25 19:05:10 2020 +0100

    qt6: fix packages for CI

diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 2d6ceb9a..1b98e542 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -38,8 +38,8 @@ clang_format:
 build:
   stage: build
   script:
-    - wget -r -l1 -np "http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_600/qt.qt6.600.gcc_64/" -A "6.0.0-0-*qtbase-Linux-RHEL_7_6-GCC-Linux-RHEL_7_6-X86_64.7z"
-    - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_600/qt.qt6.600.gcc_64/6.0.0-0-*qtbase-Linux-RHEL_7_6-GCC-Linux-RHEL_7_6-X86_64.7z
+    - wget -r -l1 -np "http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_600/qt.qt6.600.gcc_64/" -A "6.0.0-0-*qtbase-Linux-CentOS_8_1-GCC-Linux-CentOS_8_1-X86_64.7z"
+    - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_600/qt.qt6.600.gcc_64/6.0.0-0-*qtbase-Linux-CentOS_8_1-GCC-Linux-CentOS_8_1-X86_64.7z
     - wget -r -l1 -np "http://download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_600/qt.qt6.600.gcc_64/" -A "6.0.0-0-*icu-linux-Rhel7.2-x64.7z"
     - 7z x download.qt.io/online/qtsdkrepository/linux_x64/desktop/qt6_600/qt.qt6.600.gcc_64/6.0.0-0-*icu-linux-Rhel7.2-x64.7z
     - git clone --branch ${CI_COMMIT_REF_NAME} --depth 1 ${TEST_DATA_URL} test-data || git clone --depth 1 ${UPSTREAM_TEST_DATA_URL} test-data
commit 7478ee80739ad0b064389bba04e9651d68bd0fa1
Author: Albert Astals Cid <aacid at kde.org>
Date:   Wed Nov 25 01:13:01 2020 +0100

    Tweak Annot rendering code for when border width is 0
    
    Fixes issue #997

diff --git a/poppler/Annot.cc b/poppler/Annot.cc
index 0ba629c4..06a49173 100644
--- a/poppler/Annot.cc
+++ b/poppler/Annot.cc
@@ -5385,15 +5385,20 @@ void AnnotGeometry::draw(Gfx *gfx, bool printing)
 
         if (type == typeSquare) {
             appearBuilder.appendf("{0:.2f} {1:.2f} {2:.2f} {3:.2f} re\n", borderWidth / 2.0, borderWidth / 2.0, (rect->x2 - rect->x1) - borderWidth, (rect->y2 - rect->y1) - borderWidth);
-            if (fill)
-                appearBuilder.append("b\n");
-            else
+            if (fill) {
+                if (borderWidth > 0) {
+                    appearBuilder.append("b\n");
+                } else {
+                    appearBuilder.append("f\n");
+                }
+            } else if (borderWidth > 0) {
                 appearBuilder.append("S\n");
+            }
         } else {
             const double rx { (rect->x2 - rect->x1) / 2. };
             const double ry { (rect->y2 - rect->y1) / 2. };
             const double bwHalf { borderWidth / 2.0 };
-            appearBuilder.drawEllipse(rx, ry, rx - bwHalf, ry - bwHalf, fill, true);
+            appearBuilder.drawEllipse(rx, ry, rx - bwHalf, ry - bwHalf, fill, borderWidth > 0);
         }
         appearBuilder.append("Q\n");
 
@@ -5711,9 +5716,14 @@ void AnnotPolygon::draw(Gfx *gfx, bool printing)
                     appearBBox->extendTo(vertices->getX(i) - rect->x1, vertices->getY(i) - rect->y1);
                 }
 
+                const double borderWidth = border->getWidth();
                 if (interiorColor && interiorColor->getSpace() != AnnotColor::colorTransparent) {
-                    appearBuilder.append("b\n");
-                } else {
+                    if (borderWidth > 0) {
+                        appearBuilder.append("b\n");
+                    } else {
+                        appearBuilder.append("f\n");
+                    }
+                } else if (borderWidth > 0) {
                     appearBuilder.append("s\n");
                 }
             }


More information about the poppler mailing list