aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2010-07-02 10:44:18 +0000
committerJeremias Maerki <jeremias@apache.org>2010-07-02 10:44:18 +0000
commit9708ccc61aa6a0689b4e0e39c6e072c44dab3f50 (patch)
tree36d4120e4d75adb606c39c7344ef6063fae4542c /test
parent4ed47c3dd4e24ed8654695655493ac4283ed716b (diff)
downloadxmlgraphics-fop-9708ccc61aa6a0689b4e0e39c6e072c44dab3f50.tar.gz
xmlgraphics-fop-9708ccc61aa6a0689b4e0e39c6e072c44dab3f50.zip
Restored ColorExt after removing it from XML Graphics Commons again.
Moved GrayScaleColorConverter as a package-local class from XGC to the AFP package (doesn't require deprecation when we can put the functionality in XGC later with the new color infrastructure). git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@959945 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/java/org/apache/fop/traits/BorderPropsTestCase.java6
-rw-r--r--test/java/org/apache/fop/util/ColorUtilTestCase.java11
2 files changed, 8 insertions, 9 deletions
diff --git a/test/java/org/apache/fop/traits/BorderPropsTestCase.java b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
index 3332d11f2..be7714ba2 100644
--- a/test/java/org/apache/fop/traits/BorderPropsTestCase.java
+++ b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
@@ -23,10 +23,10 @@ import java.awt.Color;
import junit.framework.TestCase;
-import org.apache.xmlgraphics.java2d.color.CMYKColorSpace;
-import org.apache.xmlgraphics.java2d.color.ColorExt;
+import org.apache.xmlgraphics.java2d.color.DeviceCMYKColorSpace;
import org.apache.fop.fo.Constants;
+import org.apache.fop.util.ColorExt;
import org.apache.fop.util.ColorUtil;
/**
@@ -50,7 +50,7 @@ public class BorderPropsTestCase extends TestCase {
assertEquals(b1, b2);
float[] cmyk = new float[] {1.0f, 1.0f, 0.5f, 1.0f};
- CMYKColorSpace cmykCs = CMYKColorSpace.getInstance();
+ DeviceCMYKColorSpace cmykCs = DeviceCMYKColorSpace.getInstance();
float[] rgb = cmykCs.toRGB(cmyk);
col = ColorExt.createFromFoRgbIcc(rgb[0], rgb[1], rgb[2],
"#CMYK", null, cmykCs, cmyk);
diff --git a/test/java/org/apache/fop/util/ColorUtilTestCase.java b/test/java/org/apache/fop/util/ColorUtilTestCase.java
index 83163c888..aefd2a76a 100644
--- a/test/java/org/apache/fop/util/ColorUtilTestCase.java
+++ b/test/java/org/apache/fop/util/ColorUtilTestCase.java
@@ -24,8 +24,7 @@ import java.awt.color.ColorSpace;
import junit.framework.TestCase;
-import org.apache.xmlgraphics.java2d.color.CMYKColorSpace;
-import org.apache.xmlgraphics.java2d.color.ColorExt;
+import org.apache.xmlgraphics.java2d.color.DeviceCMYKColorSpace;
import org.apache.fop.apps.FOUserAgent;
import org.apache.fop.apps.FopFactory;
@@ -157,7 +156,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(255, colActual.getRed());
assertEquals(255, colActual.getGreen());
assertEquals(0, colActual.getBlue());
- assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
+ assertEquals(DeviceCMYKColorSpace.getInstance(), colActual.getColorSpace());
float[] comps = colActual.getColorComponents(null);
assertEquals(4, comps.length);
assertEquals(0f, comps[0], 0);
@@ -172,7 +171,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(248, colActual.getRed());
assertEquals(199, colActual.getGreen());
assertEquals(172, colActual.getBlue());
- assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
+ assertEquals(DeviceCMYKColorSpace.getInstance(), colActual.getColorSpace());
comps = colActual.getColorComponents(null);
assertEquals(0.0274f, comps[0], 0.001);
assertEquals(0.2196f, comps[1], 0.001);
@@ -186,7 +185,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(255, colActual.getRed());
assertEquals(255, colActual.getGreen());
assertEquals(0, colActual.getBlue());
- assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
+ assertEquals(DeviceCMYKColorSpace.getInstance(), colActual.getColorSpace());
comps = colActual.getColorComponents(null);
assertEquals(4, comps.length);
assertEquals(0f, comps[0], 0);
@@ -201,7 +200,7 @@ public class ColorUtilTestCase extends TestCase {
assertEquals(127, colActual.getRed());
assertEquals(127, colActual.getGreen());
assertEquals(127, colActual.getBlue());
- assertEquals(CMYKColorSpace.getInstance(), colActual.getColorSpace());
+ assertEquals(DeviceCMYKColorSpace.getInstance(), colActual.getColorSpace());
comps = colActual.getColorComponents(null);
assertEquals(4, comps.length);
assertEquals(0f, comps[0], 0);