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 2006/04/18 14:36:59 UTC
svn commit: r394928 - in /xmlgraphics/fop/trunk:
src/java/org/apache/fop/svg/PDFGraphics2D.java status.xml
Author: jeremias
Date: Tue Apr 18 05:36:58 2006
New Revision: 394928
URL: http://svn.apache.org/viewcvs?rev=394928&view=rev
Log:
Bugfix: The generation of the PDF "d" (setdash) command was assuming that only integer values can be used but that isn't the case. Dash patterns PDFGraphics2D would be wrong in the process.
Modified:
xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java
xmlgraphics/fop/trunk/status.xml
Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java?rev=394928&r1=394927&r2=394928&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/svg/PDFGraphics2D.java Tue Apr 18 05:36:58 2006
@@ -1271,20 +1271,14 @@
if (da != null) {
currentStream.write("[");
for (int count = 0; count < da.length; count++) {
- if (((int)da[count]) == 0) {
- // the dasharray units in pdf are (whole) numbers
- // in user space units, cannot be 0
- currentStream.write("1");
- } else {
- currentStream.write("" + ((int)da[count]));
- }
+ currentStream.write(PDFNumber.doubleOut(da[count]));
if (count < da.length - 1) {
currentStream.write(" ");
}
}
currentStream.write("] ");
float offset = bs.getDashPhase();
- currentStream.write(((int)offset) + " d\n");
+ currentStream.write(PDFNumber.doubleOut(offset) + " d\n");
}
int ec = bs.getEndCap();
switch (ec) {
Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewcvs/xmlgraphics/fop/trunk/status.xml?rev=394928&r1=394927&r2=394928&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Tue Apr 18 05:36:58 2006
@@ -28,6 +28,11 @@
<changes>
<release version="FOP Trunk">
<action context="Code" dev="JM" type="fix">
+ Bugfix: The generation of the PDF "d" (setdash) command was assuming that
+ only integer values can be used but that isn't the case. Dash patterns
+ PDFGraphics2D would be wrong in the process.
+ </action>
+ <action context="Code" dev="JM" type="fix">
Bugfix: Fixed a division by zero problem in TTFReader and improved the detection
of the capHeight and xHeight font metric values for TrueType fonts.
</action>
---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org