diff options
author | Jeremias Maerki <jeremias@apache.org> | 2006-04-18 12:36:58 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2006-04-18 12:36:58 +0000 |
commit | 274e03076bc7dd15e444f1628d96f0703b40e16f (patch) | |
tree | effac4a56a23716d0518579fa223d7d6b519901c /src | |
parent | 001c8a9e479b1e14ec5940978ff7714ddd27a4bb (diff) | |
download | xmlgraphics-fop-274e03076bc7dd15e444f1628d96f0703b40e16f.tar.gz xmlgraphics-fop-274e03076bc7dd15e444f1628d96f0703b40e16f.zip |
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.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@394928 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src')
-rw-r--r-- | src/java/org/apache/fop/svg/PDFGraphics2D.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/java/org/apache/fop/svg/PDFGraphics2D.java b/src/java/org/apache/fop/svg/PDFGraphics2D.java index 1709caba7..a563449de 100644 --- a/src/java/org/apache/fop/svg/PDFGraphics2D.java +++ b/src/java/org/apache/fop/svg/PDFGraphics2D.java @@ -1271,20 +1271,14 @@ public class PDFGraphics2D extends AbstractGraphics2D { 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) { |