pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From til...@apache.org
Subject svn commit: r1575710 - in /pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading: GouraudShadingContext.java Type1ShadingContext.java
Date Sun, 09 Mar 2014 14:03:24 GMT
Author: tilman
Date: Sun Mar  9 14:03:23 2014
New Revision: 1575710

URL: http://svn.apache.org/r1575710
Log:
PDFBOX-1970: flip AffineTransform in 1.8 branch only

Modified:
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/GouraudShadingContext.java
    pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type1ShadingContext.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=1575710&r1=1575709&r2=1575710&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
Sun Mar  9 14:03:23 2014
@@ -95,6 +95,11 @@ public abstract class GouraudShadingCont
     protected GouraudShadingContext(PDShadingResources shadingType, ColorModel colorModelValue,
             AffineTransform xform, Matrix ctm, int pageHeight) throws IOException
     {
+        // PDFBOX-1966 flip the AffineTransform in 1.8 branch
+        //TODO find out why AffineTransform passed in 1.8 branch is flipped         
+        xform.scale(1,-1);
+        xform.translate(0, -pageHeight);
+        
         gouraudShadingType = shadingType;
         triangleList = new ArrayList<GouraudTriangle>();
         colorSpace = shadingType.getColorSpace();

Modified: pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type1ShadingContext.java
URL: http://svn.apache.org/viewvc/pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type1ShadingContext.java?rev=1575710&r1=1575709&r2=1575710&view=diff
==============================================================================
--- pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type1ShadingContext.java
(original)
+++ pdfbox/branches/1.8/pdfbox/src/main/java/org/apache/pdfbox/pdmodel/graphics/shading/Type1ShadingContext.java
Sun Mar  9 14:03:23 2014
@@ -69,6 +69,11 @@ class Type1ShadingContext implements Pai
             AffineTransform xform, Matrix currentTransformationMatrix, int pageHeight)
     {
         shadingType = shadingType1;
+        
+        // PDFBOX-1966 flip the AffineTransform in 1.8 branch
+        //TODO find out why AffineTransform passed in 1.8 branch is flipped         
+        xform.scale(1,-1);
+        xform.translate(0, -pageHeight);
 
         // colorSpace 
         try



Mime
View raw message