aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2011-02-10 13:02:10 +0000
committerJeremias Maerki <jeremias@apache.org>2011-02-10 13:02:10 +0000
commitb190db6910a3e133d8c1696b4730d77383f98c92 (patch)
treee70ee8047ef585385dd70df8e7fe1a306bf6fe24
parent4f3ab56159ac8a61c19894abb83eca1ffad1b307 (diff)
downloadxmlgraphics-fop-b190db6910a3e133d8c1696b4730d77383f98c92.tar.gz
xmlgraphics-fop-b190db6910a3e133d8c1696b4730d77383f98c92.zip
Simplification as suggested by Simon.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_Color@1069376 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java b/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
index edde6b95f..07d6c78af 100644
--- a/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
+++ b/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
@@ -68,21 +68,19 @@ public class GraphicsSetProcessColor extends AbstractGraphicsDrawingOrder {
int colSpaceType = cs.getType();
if (colSpaceType == ColorSpace.TYPE_CMYK) {
this.color = color;
- this.componentsSize = 4;
} else if (cs instanceof CIELabColorSpace) {
//TODO Convert between illuminants if not D50 according to rendering intents
//Right now, we're assuming D50 as the GOCA spec requires.
this.color = color;
//16bit components didn't work, and 8-bit sadly has reduced accuracy.
- this.componentsSize = 3;
} else {
if (!color.getColorSpace().isCS_sRGB()) {
this.color = ColorUtil.toSRGBColor(color);
} else {
this.color = color;
}
- this.componentsSize = 3;
}
+ this.componentsSize = this.color.getColorSpace().getNumComponents();
}
/** {@inheritDoc} */
@@ -91,6 +89,7 @@ public class GraphicsSetProcessColor extends AbstractGraphicsDrawingOrder {
}
/** {@inheritDoc} */
+ @Override
byte getOrderCode() {
return (byte) 0xB2;
}
@@ -153,6 +152,7 @@ public class GraphicsSetProcessColor extends AbstractGraphicsDrawingOrder {
}
/** {@inheritDoc} */
+ @Override
public String toString() {
return "GraphicsSetProcessColor(col=" + color + ")";
}