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 2005/05/02 17:56:46 UTC

cvs commit: xml-fop/src/java/org/apache/fop/render/pdf PDFRenderer.java

jeremias    2005/05/02 08:56:46

  Modified:    src/java/org/apache/fop/render/pdf Tag:
                        Temp_KnuthStylePageBreaking PDFRenderer.java
  Log:
  Fix for left outer border painting.
  Fix for after/end outer border edge painting.
  Style.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.81.2.2  +9 -8      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.81.2.1
  retrieving revision 1.81.2.2
  diff -u -r1.81.2.1 -r1.81.2.2
  --- PDFRenderer.java	28 Mar 2005 06:14:13 -0000	1.81.2.1
  +++ PDFRenderer.java	2 May 2005 15:56:46 -0000	1.81.2.2
  @@ -655,18 +655,18 @@
               }
           }
   
  -        boolean b[] = new boolean[] {
  +        boolean[] b = new boolean[] {
               (bpsBefore != null), (bpsEnd != null), 
               (bpsAfter != null), (bpsStart != null)};
           if (!b[0] && !b[1] && !b[2] && !b[3]) {
               return;
           }
  -        float bw[] = new float[] {
  +        float[] bw = new float[] {
               (b[0] ? bpsBefore.width / 1000f : 0.0f),
               (b[1] ? bpsEnd.width / 1000f : 0.0f),
               (b[2] ? bpsAfter.width / 1000f : 0.0f),
               (b[3] ? bpsStart.width / 1000f : 0.0f)};
  -        float clipw[] = new float[] {
  +        float[] clipw = new float[] {
               BorderProps.getClippedWidth(bpsBefore) / 1000f,    
               BorderProps.getClippedWidth(bpsEnd) / 1000f,    
               BorderProps.getClippedWidth(bpsAfter) / 1000f,    
  @@ -678,7 +678,7 @@
           width -= clipw[3];
           width -= clipw[1];
           
  -        boolean slant[] = new boolean[] {
  +        boolean[] slant = new boolean[] {
               (b[3] && b[0]), (b[0] && b[1]), (b[1] && b[2]), (b[2] && b[3])};
           if (bpsBefore != null) {
               endTextObject();
  @@ -710,7 +710,8 @@
               lineTo(sx2, innery);
               closePath();
               clip();
  -            drawBorderLine(sx1a, outery, ex1a, innery, true, true, bpsBefore.style, bpsBefore.color);
  +            drawBorderLine(sx1a, outery, ex1a, innery, true, true, 
  +                    bpsBefore.style, bpsBefore.color);
               restoreGraphicsState();
           }
           if (bpsEnd != null) {
  @@ -765,7 +766,7 @@
                   if (bpsStart != null && bpsStart.mode == BorderProps.COLLAPSE_OUTER) {
                       sx1a -= clipw[3];
                   }
  -                if (bpsStart != null && bpsStart.mode == BorderProps.COLLAPSE_OUTER) {
  +                if (bpsEnd != null && bpsEnd.mode == BorderProps.COLLAPSE_OUTER) {
                       ex1a += clipw[1];
                   }
                   lineTo(ex1a, outery);
  @@ -785,7 +786,7 @@
               float sy1 = starty;
               float sy2 = (slant[0] ? sy1 + bw[0] - clipw[0] : sy1);
               float ey1 = sy1 + height;
  -            float ey2 = (slant[3] ? ey1 - bw[2] + clipw[2]: ey1);
  +            float ey2 = (slant[3] ? ey1 - bw[2] + clipw[2] : ey1);
               float outerx = startx - clipw[3];
               float clipx = outerx + clipw[3];
               float innerx = outerx + bw[3];
  @@ -801,8 +802,8 @@
                   if (bpsAfter != null && bpsAfter.mode == BorderProps.COLLAPSE_OUTER) {
                       ey1a += clipw[2];
                   }
  -                lineTo(outerx, sy1a);
                   lineTo(outerx, ey1a);
  +                lineTo(outerx, sy1a);
               }
               lineTo(clipx, sy1);
               lineTo(innerx, sy2);
  
  
  

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