Author: vhennebert
Date: Mon Nov 23 11:55:04 2009
New Revision: 883314

URL: http://svn.apache.org/viewvc?rev=883314&view=rev
Log:
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)

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
    xmlgraphics/fop/trunk/status.xml

Modified: 
xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java?rev=883314&r1=883313&r2=883314&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java 
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/afp/ptoca/PtocaBuilder.java 
Mon Nov 23 11:55:04 2009
@@ -329,7 +329,7 @@
             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 {

Modified: xmlgraphics/fop/trunk/status.xml
URL: 
http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=883314&r1=883313&r2=883314&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Mon Nov 23 11:55:04 2009
@@ -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.



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to