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 ke...@apache.org on 2001/10/22 09:27:30 UTC

cvs commit: xml-fop/src/org/apache/fop/svg PDFGraphics2D.java

keiron      01/10/22 00:27:30

  Modified:    src/org/apache/fop/svg PDFGraphics2D.java
  Log:
  handles path transform properly, makes a difference to the line width
  
  Revision  Changes    Path
  1.20      +13 -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.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- PDFGraphics2D.java	2001/10/12 06:40:13	1.19
  +++ PDFGraphics2D.java	2001/10/22 07:27:30	1.20
  @@ -1,5 +1,5 @@
   /*
  - * $Id: PDFGraphics2D.java,v 1.19 2001/10/12 06:40:13 keiron Exp $
  + * $Id: PDFGraphics2D.java,v 1.20 2001/10/22 07:27:30 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:keiron@aftexsw.com">Keiron Liddle</a>
  - * @version $Id: PDFGraphics2D.java,v 1.19 2001/10/12 06:40:13 keiron Exp $
  + * @version $Id: PDFGraphics2D.java,v 1.20 2001/10/22 07:27:30 keiron Exp $
    * @see org.apache.batik.ext.awt.g2d.AbstractGraphics2D
    */
   public class PDFGraphics2D extends AbstractGraphics2D {
  @@ -511,7 +511,17 @@
           applyPaint(getPaint(), false);
           applyStroke(getStroke());
   
  -        PathIterator iter = s.getPathIterator(getTransform());
  +        AffineTransform trans = getTransform();
  +        double[] tranvals = new double[6];
  +        trans.getMatrix(tranvals);
  +        currentStream.write(PDFNumber.doubleOut(tranvals[0]) + " "
  +                            + PDFNumber.doubleOut(tranvals[1]) + " "
  +                            + PDFNumber.doubleOut(tranvals[2]) + " "
  +                            + PDFNumber.doubleOut(tranvals[3]) + " "
  +                            + PDFNumber.doubleOut(tranvals[4]) + " "
  +                            + PDFNumber.doubleOut(tranvals[5]) + " cm\n");
  +
  +        PathIterator iter = s.getPathIterator(new AffineTransform());
           while (!iter.isDone()) {
               double vals[] = new double[6];
               int type = iter.currentSegment(vals);
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: fop-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-cvs-help@xml.apache.org