pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1783131 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
Date Wed, 15 Feb 2017 17:58:32 GMT
Author: tilman
Date: Wed Feb 15 17:58:32 2017
New Revision: 1783131

URL: http://svn.apache.org/viewvc?rev=1783131&view=rev
Log:
PDFBOX-3686: adjust color values to be in 0..1 interval

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java?rev=1783131&r1=1783130&r2=1783131&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java (original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/rendering/PageDrawer.java Wed Feb
15 17:58:32 2017
@@ -243,8 +243,16 @@ public class PageDrawer extends PDFGraph
         clipWindingRule = oldClipWindingRule;
     }
 
+    private float clampColor(float color)
+    {
+        return (color < 0 ? 0 : (color > 1 ? 1 : color));        
+    }
+
     /**
      * Returns an AWT paint for the given PDColor.
+     * 
+     * @param color The color to get a paint for. This can be an actual color or a pattern.
+     * @throws IOException
      */
     protected Paint getPaint(PDColor color) throws IOException
     {



Mime
View raw message