xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vhenneb...@apache.org
Subject svn commit: r1611651 - in /xmlgraphics/fop/branches/FOP-2393_gradient-rendering: src/java/org/apache/fop/pdf/ src/java/org/apache/fop/render/gradient/ test/java/org/apache/fop/render/gradient/ test/java/org/apache/fop/render/ps/svg/
Date Fri, 18 Jul 2014 13:48:08 GMT
Author: vhennebert
Date: Fri Jul 18 13:48:07 2014
New Revision: 1611651

URL: http://svn.apache.org/r1611651
Log:
For a Shading object, domain is optional and its default value is what we need

Modified:
    xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/pdf/PDFShading.java
    xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/render/gradient/Shading.java
    xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/gradient/GradientTestCase.java
    xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-linear-gradient.ps
    xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-radial-gradient.ps

Modified: xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/pdf/PDFShading.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/pdf/PDFShading.java?rev=1611651&r1=1611650&r2=1611651&view=diff
==============================================================================
--- xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/pdf/PDFShading.java
(original)
+++ xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/pdf/PDFShading.java
Fri Jul 18 13:48:07 2014
@@ -165,13 +165,6 @@ public class PDFShading extends PDFObjec
         } else if (other.getBBox() != null) {
             return false;
         }
-        if (shading.getDomain() != null) {
-            if (!shading.getDomain().equals(other.getDomain())) {
-                return false;
-            }
-        } else if (other.getDomain() != null) {
-            return false;
-        }
         if (shading.getMatrix() != null) {
             if (!shading.getMatrix().equals(other.getMatrix())) {
                 return false;

Modified: xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/render/gradient/Shading.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/render/gradient/Shading.java?rev=1611651&r1=1611650&r2=1611651&view=diff
==============================================================================
--- xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/render/gradient/Shading.java
(original)
+++ xmlgraphics/fop/branches/FOP-2393_gradient-rendering/src/java/org/apache/fop/render/gradient/Shading.java
Fri Jul 18 13:48:07 2014
@@ -74,16 +74,6 @@ public class Shading {
     private final List<Double> background;
 
     /**
-     * Optional for Type 1: Array of four numbers, xmin, xmax, ymin, ymax.
-     *                      Default is [0 1 0 1]
-     * Optional for Type 2: An array of two numbers between which the blend
-     *                      varies between start and end points. Default is 0, 1.
-     * Optional for Type 3: An array of two numbers between which the blend
-     *                      varies between start and end points. Default is 0, 1.
-     */
-    private final List<Double> domain;
-
-    /**
      * Required for Type 4,5,6, and 7: Array of Doubles which specifies
      * how to decode coordinate and color component values.
      * Each type has a differing number of decode array members, so check
@@ -142,7 +132,6 @@ public class Shading {
         this.bbox = null;
         this.antiAlias = false;
         this.coords = coords;
-        this.domain = Arrays.asList(0.0, 1.0);
         this.function = function;
         this.extend = Arrays.asList(true, true);
         this.matrix = null;
@@ -181,10 +170,6 @@ public class Shading {
         return background;
     }
 
-    public List<Double> getDomain() {
-        return domain;
-    }
-
     public List<Double> getDecode() {
         return decode;
     }
@@ -258,10 +243,6 @@ public class Shading {
 
     private void outputShadingType1(StringBuilder out, DoubleFormatter doubleFormatter,
             Shading.FunctionRenderer functionRenderer) {
-        out.append("/Domain ");
-        GradientMaker.outputDoubles(out, doubleFormatter, domain);
-        out.append("\n");
-
         if (matrix != null) {
             out.append("/Matrix ");
             GradientMaker.outputDoubles(out, doubleFormatter, matrix);
@@ -278,10 +259,6 @@ public class Shading {
             out.append("\n");
         }
 
-        out.append("/Domain ");
-        GradientMaker.outputDoubles(out, doubleFormatter, domain);
-        out.append("\n");
-
         out.append("/Extend [ ");
         for (Boolean b : extend) {
             out.append(b);

Modified: xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/gradient/GradientTestCase.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/gradient/GradientTestCase.java?rev=1611651&r1=1611650&r2=1611651&view=diff
==============================================================================
--- xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/gradient/GradientTestCase.java
(original)
+++ xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/gradient/GradientTestCase.java
Fri Jul 18 13:48:07 2014
@@ -72,11 +72,6 @@ public class GradientTestCase {
             return this;
         }
 
-        ShadingChecker domain(Double... expectedDomain) {
-            assertArrayEquals(expectedDomain, shading.getDomain().toArray());
-            return this;
-        }
-
         ShadingChecker extend(Boolean... expectedExtend) {
             assertArrayEquals(expectedExtend, shading.getExtend().toArray());
             return this;
@@ -138,7 +133,6 @@ public class GradientTestCase {
         ShadingChecker shadingChecker = patternChecker.shading()
                 .shadingType(2)
                 .coords(0.0, 0.0, 100.0, 100.0)
-                .domain(0.0, 1.0)
                 .extend(true, true);
         FunctionChecker functionChecker = shadingChecker.function()
                 .functionType(3)

Modified: xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-linear-gradient.ps
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-linear-gradient.ps?rev=1611651&r1=1611650&r2=1611651&view=diff
==============================================================================
--- xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-linear-gradient.ps
(original)
+++ xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-linear-gradient.ps
Fri Jul 18 13:48:07 2014
@@ -6,7 +6,6 @@
 /ShadingType 2
 /ColorSpace /DeviceRGB
 /Coords [ 115 285 15 15 ]
-/Domain [ 0 1 ]
 /Extend [ true true ]
 /Function <<
 /FunctionType 3

Modified: xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-radial-gradient.ps
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-radial-gradient.ps?rev=1611651&r1=1611650&r2=1611651&view=diff
==============================================================================
--- xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-radial-gradient.ps
(original)
+++ xmlgraphics/fop/branches/FOP-2393_gradient-rendering/test/java/org/apache/fop/render/ps/svg/expected-radial-gradient.ps
Fri Jul 18 13:48:07 2014
@@ -6,7 +6,6 @@
 /ShadingType 3
 /ColorSpace /DeviceRGB
 /Coords [ 840 180 0 840 180 16 ]
-/Domain [ 0 1 ]
 /Extend [ true true ]
 /Function <<
 /FunctionType 3



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message