diff options
author | Jeremias Maerki <jeremias@apache.org> | 2008-08-13 15:00:57 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2008-08-13 15:00:57 +0000 |
commit | 686f92dd78dcf4b6750230a55de5c1427ab20464 (patch) | |
tree | 56f4637b70a292c39213042a2c747868fed320c9 /test | |
parent | 804a2ba264030f4ff6a25b3f23ff16cb47593ff1 (diff) | |
parent | a31b0119d41994f4aff1eb5c1c8639c780e420b8 (diff) | |
download | xmlgraphics-fop-686f92dd78dcf4b6750230a55de5c1427ab20464.tar.gz xmlgraphics-fop-686f92dd78dcf4b6750230a55de5c1427ab20464.zip |
Merged from Trunk revision 685573:
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/branches/Temp_AreaTreeNewDesign@685579 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/java/org/apache/fop/traits/BorderPropsTestCase.java | 7 |
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(); |