pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1615145 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/RadialShadingContext.java
Date Fri, 01 Aug 2014 15:39:11 GMT
Author: tilman
Date: Fri Aug  1 15:39:11 2014
New Revision: 1615145

URL: http://svn.apache.org/r1615145
Log:
PDFBOX-1915: extend radial shadings only if radius > 0

Modified:
    pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/RadialShadingContext.java

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/RadialShadingContext.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/RadialShadingContext.java?rev=1615145&r1=1615144&r2=1615145&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/RadialShadingContext.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/RadialShadingContext.java
Fri Aug  1 15:39:11 2014
@@ -323,8 +323,8 @@ public class RadialShadingContext implem
                     // input value is out of range
                     if (inputValue > 1)
                     {
-                        // the shading has to be extended if extend[1] == true
-                        if (extend[1])
+                        // extend shading if extend[1] is true and nonzero radius
+                        if (extend[1] && coords[5] > 0)
                         {
                             inputValue = 1;
                         }
@@ -343,8 +343,8 @@ public class RadialShadingContext implem
                     // input value is out of range
                     else if (inputValue < 0)
                     {
-                        // the shading has to be extended if extend[0] == true
-                        if (extend[0])
+                        // extend shading if extend[0] is true and nonzero radius
+                        if (extend[0] && coords[2] > 0)
                         {
                             inputValue = 0;
                         }



Mime
View raw message