bckfnn      2004/02/04 05:06:36

  Modified:    src/java/org/apache/fop/render AbstractRenderer.java
               src/java/org/apache/fop/render/pdf PDFRenderer.java
  Log:
  Do the regiontraits before changes ctm because the ctm only apply for the
  region reference area, not the viewport itself.
  
  Revision  Changes    Path
  1.21      +2 -2      xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java
  
  Index: AbstractRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/AbstractRenderer.java,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- AbstractRenderer.java     29 Jan 2004 19:45:48 -0000      1.20
  +++ AbstractRenderer.java     4 Feb 2004 13:06:36 -0000       1.21
  @@ -330,11 +330,11 @@
               currentBlockIPPosition = currentIPPosition;
   
               RegionReference region = port.getRegion();
  +            handleRegionTraits(port);
  +
               //  shouldn't the viewport have the CTM
               startVParea(region.getCTM());
  -
               // do after starting viewport area
  -            handleRegionTraits(port);
               if (region.getRegionClass() == Region.BODY_CODE) {
                   renderBodyRegion((BodyRegion) region);
               } else {
  
  
  
  1.32      +4 -3      xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java
  
  Index: PDFRenderer.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/pdf/PDFRenderer.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- PDFRenderer.java  3 Feb 2004 22:11:15 -0000       1.31
  +++ PDFRenderer.java  4 Feb 2004 13:06:36 -0000       1.32
  @@ -546,9 +546,9 @@
        */
       protected void handleRegionTraits(RegionViewport region) {
           currentFontName = "";
  -        float startx = 0;
  -        float starty = 0;
           Rectangle2D viewArea = region.getViewArea();
  +        float startx = (float)(viewArea.getX() / 1000f);
  +        float starty = (float)(viewArea.getY() / 1000f);;
           float width = (float)(viewArea.getWidth() / 1000f);
           float height = (float)(viewArea.getHeight() / 1000f);
   
  @@ -557,8 +557,9 @@
               bpMarginOffset = region.getBorderAndPaddingWidthBefore();
               ipMarginOffset = region.getBorderAndPaddingWidthStart();
           }
  -
  +        beginTextObject();
           drawBackAndBorders(region, startx, starty, width, height);
  +        endTextObject();
       }
   
       /**
  
  
  

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

Reply via email to