aboutsummaryrefslogtreecommitdiffstats
path: root/test/java
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2008-08-13 14:34:03 +0000
committerJeremias Maerki <jeremias@apache.org>2008-08-13 14:34:03 +0000
commita31b0119d41994f4aff1eb5c1c8639c780e420b8 (patch)
treeb9081c58f902e7c8bfd41785825af76380af4e61 /test/java
parentff243bf1dd6062bbe624391a9ef79fc26018a23f (diff)
downloadxmlgraphics-fop-a31b0119d41994f4aff1eb5c1c8639c780e420b8.tar.gz
xmlgraphics-fop-a31b0119d41994f4aff1eb5c1c8639c780e420b8.zip
Fixed border trait parsing for the area tree XML when CMYK or ICC colors were used.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@685573 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/java')
-rw-r--r--test/java/org/apache/fop/traits/BorderPropsTestCase.java7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/java/org/apache/fop/traits/BorderPropsTestCase.java b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
index 6aea38512..0c08e05af 100644
--- a/test/java/org/apache/fop/traits/BorderPropsTestCase.java
+++ b/test/java/org/apache/fop/traits/BorderPropsTestCase.java
@@ -24,6 +24,8 @@ import java.awt.Color;
import junit.framework.TestCase;
import org.apache.fop.fo.Constants;
+import org.apache.fop.util.CMYKColorSpace;
+import org.apache.fop.util.ColorExt;
import org.apache.fop.util.ColorUtil;
/**
@@ -46,6 +48,11 @@ public class BorderPropsTestCase extends TestCase {
BorderProps b2 = BorderProps.valueOf(null, ser);
assertEquals(b1, b2);
+ float[] cmyk = new float[] {1.0f, 1.0f, 0.5f, 1.0f};
+ CMYKColorSpace cmykCs = CMYKColorSpace.getInstance();
+ float[] rgb = cmykCs.toRGB(cmyk);
+ col = ColorExt.createFromFoRgbIcc(rgb[0], rgb[1], rgb[2],
+ null, "#CMYK", cmykCs, cmyk);
b1 = new BorderProps(Constants.EN_INSET, 9999,
col, BorderProps.SEPARATE);
ser = b1.toString();