pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1597974 - /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java
Date Wed, 28 May 2014 11:10:33 GMT
Author: tilman
Date: Wed May 28 11:10:33 2014
New Revision: 1597974

URL: http://svn.apache.org/r1597974
Log:
PDFBOX-2100: shading with function has color count 1

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java?rev=1597974&r1=1597973&r2=1597974&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java
Wed May 28 11:10:33 2014
@@ -103,9 +103,10 @@ public abstract class GouraudShadingCont
         gouraudShadingType = shadingType;
         triangleList = new ArrayList<GouraudTriangle>();
         colorSpace = shadingType.getColorSpace();
-        hasFunction = shadingType.getFunction() != null;
         LOG.debug("colorSpace: " + colorSpace);
-        numberOfColorComponents = colorSpace.getNumberOfComponents();
+        hasFunction = shadingType.getFunction() != null;
+        LOG.debug("hasFunction: " + hasFunction);
+        numberOfColorComponents = hasFunction ? 1 : colorSpace.getNumberOfComponents();
         LOG.debug("numberOfColorComponents: " + numberOfColorComponents);
         LOG.debug("BBox: " + shadingType.getBBox());
         LOG.debug("Background: " + shadingType.getBackground());



Mime
View raw message