keiron      01/08/30 01:50:00

  Modified:    src/org/apache/fop/svg PDFGraphics2D.java
  Log:
  fixed dasharray units for small values that round to 0
  
  Revision  Changes    Path
  1.17      +9 -3      xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java
  
  Index: PDFGraphics2D.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/PDFGraphics2D.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- PDFGraphics2D.java        2001/08/17 06:42:56     1.16
  +++ PDFGraphics2D.java        2001/08/30 08:50:00     1.17
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFGraphics2D.java,v 1.16 2001/08/17 06:42:56 keiron Exp $
  + * $Id: PDFGraphics2D.java,v 1.17 2001/08/30 08:50:00 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -43,7 +43,7 @@
    * implementing a <tt>Graphic2D</tt> piece-meal.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Keiron Liddle</a>
  - * @version $Id: PDFGraphics2D.java,v 1.16 2001/08/17 06:42:56 keiron Exp $
  + * @version $Id: PDFGraphics2D.java,v 1.17 2001/08/30 08:50:00 keiron Exp $
    * @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
    */
   public class PDFGraphics2D extends AbstractGraphics2D {
  @@ -659,7 +659,13 @@
               if (da != null) {
                   currentStream.write("[");
                   for (int count = 0; count < da.length; count++) {
  -                    currentStream.write("" + ((int)da[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]));
  +                    }
                       if (count < da.length - 1) {
                           currentStream.write(" ");
                       }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to