You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by je...@apache.org on 2011/02/10 14:02:10 UTC
svn commit: r1069376 -
/xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
Author: jeremias
Date: Thu Feb 10 13:02:10 2011
New Revision: 1069376
URL: http://svn.apache.org/viewvc?rev=1069376&view=rev
Log:
Simplification as suggested by Simon.
Modified:
xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
Modified: xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java?rev=1069376&r1=1069375&r2=1069376&view=diff
==============================================================================
--- xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java (original)
+++ xmlgraphics/fop/branches/Temp_Color/src/java/org/apache/fop/afp/goca/GraphicsSetProcessColor.java Thu Feb 10 13:02:10 2011
@@ -68,21 +68,19 @@ public class GraphicsSetProcessColor ext
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 ext
}
/** {@inheritDoc} */
+ @Override
byte getOrderCode() {
return (byte) 0xB2;
}
@@ -153,6 +152,7 @@ public class GraphicsSetProcessColor ext
}
/** {@inheritDoc} */
+ @Override
public String toString() {
return "GraphicsSetProcessColor(col=" + color + ")";
}
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org