You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pdfbox.apache.org by ti...@apache.org on 2022/01/20 18:20:48 UTC

svn commit: r1897264 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/CloudyBorder.java

Author: tilman
Date: Thu Jan 20 18:20:47 2022
New Revision: 1897264

URL: http://svn.apache.org/viewvc?rev=1897264&view=rev
Log:
PDFBOX-4892: LGTM fix

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/CloudyBorder.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/CloudyBorder.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/CloudyBorder.java?rev=1897264&r1=1897263&r2=1897264&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/CloudyBorder.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/interactive/annotation/handlers/CloudyBorder.java Thu Jan 20 18:20:47 2022
@@ -85,7 +85,7 @@ class CloudyBorder
      */
     void createCloudyRectangle(PDRectangle rd) throws IOException
     {
-        rectWithDiff = applyRectDiff(rd, lineWidth / 2);
+        rectWithDiff = applyRectDiff(rd, (float) (lineWidth / 2));
         double left = rectWithDiff.getLowerLeftX();
         double bottom = rectWithDiff.getLowerLeftY();
         double right = rectWithDiff.getUpperRightX();
@@ -493,7 +493,7 @@ class CloudyBorder
         }
     }
 
-    private PDRectangle applyRectDiff(PDRectangle rd, double min)
+    private PDRectangle applyRectDiff(PDRectangle rd, float min)
     {
         float rectLeft = annotRect.getLowerLeftX();
         float rectBottom = annotRect.getLowerLeftY();
@@ -506,10 +506,10 @@ class CloudyBorder
         rectRight = Math.max(rectLeft, rectRight);
         rectTop = Math.max(rectBottom, rectTop);
 
-        double rdLeft;
-        double rdBottom;
-        double rdRight;
-        double rdTop;
+        float rdLeft;
+        float rdBottom;
+        float rdRight;
+        float rdTop;
 
         if (rd != null)
         {