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
This commit is contained in:
Vincent Hennebert 2009-11-23 11:55:04 +00:00
parent c161b98d6d
commit 62581cef42
2 changed files with 4 additions and 1 deletions

View File

@ -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 {

View File

@ -58,6 +58,9 @@
documents. Example: the fix of marks layering will be such a case when it's done.
-->
<release version="FOP Trunk" date="TBD">
<action context="Renderers" dev="VH" type="fix" fixes-bug="48185" due-to="Harald G. Henne">
Bugfix in AFP output: rounding error when computing the CMYK components of a color.
</action>
<action context="Code" dev="VH" type="fix" fixes-bug="48167" due-to="Venkat Reddy">
Bugfix: when #CMYK pseudo-profile was used in the rgb-icc() function, always the fallback
RGB colors were used instead.