pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1670445 - /pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
Date Tue, 31 Mar 2015 19:44:12 GMT
Author: tilman
Date: Tue Mar 31 19:44:11 2015
New Revision: 1670445

URL: http://svn.apache.org/r1670445
Log:
PDFBOX-2576: use correct cast / remove unneeded cast

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

Modified: pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
URL: http://svn.apache.org/viewvc/pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java?rev=1670445&r1=1670444&r2=1670445&view=diff
==============================================================================
--- pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
(original)
+++ pdfbox/trunk/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/PatchMeshesShadingContext.java
Tue Mar 31 19:44:11 2015
@@ -65,7 +65,7 @@ abstract class PatchMeshesShadingContext
     {
         super(shading, colorModel, xform, matrix, deviceBounds);
         patchMeshesShadingType = shading;
-        bitsPerFlag = ((PDShadingType6) shading).getBitsPerFlag();
+        bitsPerFlag = ((PDShadingType4) shading).getBitsPerFlag();
         patchList = new ArrayList<Patch>();
     }
 
@@ -214,8 +214,8 @@ abstract class PatchMeshesShadingContext
                 for (int j = 0; j < numberOfColorComponents; j++)
                 {
                     long c = input.readBits(bitsPerColorComponent);
-                    color[i][j] = (float) interpolate(c, maxSrcColor, colRange[j].getMin(),
-                                                      colRange[j].getMax());
+                    color[i][j] = interpolate(c, maxSrcColor, colRange[j].getMin(),
+                            colRange[j].getMax());
                 }
             }
         }



Mime
View raw message