aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
diff options
context:
space:
mode:
authorVincent Hennebert <vhennebert@apache.org>2009-11-23 11:55:04 +0000
committerVincent Hennebert <vhennebert@apache.org>2009-11-23 11:55:04 +0000
commit62581cef4223490f296b3fae8dd3693aed146389 (patch)
tree469a4a82c1aa63520cf23930bd3f8b846219719e /src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
parentc161b98d6d5e129705cd51e28ac912508771076e (diff)
downloadxmlgraphics-fop-62581cef4223490f296b3fae8dd3693aed146389.tar.gz
xmlgraphics-fop-62581cef4223490f296b3fae8dd3693aed146389.zip
Bugzilla #48185: rounding error when computing the CMYK components of a color, in the AFP output.
Patch submitted by Harald G. Henne (initially in Bugzilla #48167) git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@883314 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java')
-rw-r--r--src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java b/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
index 40adb5ed8..e583b81e6 100644
--- a/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
+++ b/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
@@ -329,7 +329,7 @@ public abstract class PtocaBuilder implements PtocaConstants {
float[] comps = col.getColorComponents(null);
assert comps.length == 4;
for (int i = 0; i < 4; i++) {
- int component = Math.round(comps[i] * 256);
+ int component = Math.round(comps[i] * 255);
writeByte(component);
}
} else {