]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Commit Art Welch fix to PCL borders
authorKaren Lease <klease@apache.org>
Fri, 16 Mar 2001 22:59:43 +0000 (22:59 +0000)
committerKaren Lease <klease@apache.org>
Fri, 16 Mar 2001 22:59:43 +0000 (22:59 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194162 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/render/pcl/PCLRenderer.java

index 3b0b17cb94b5f9237de6d49218a6ec3379e06b52..e38e127452ab53a660589ffa2250ddce13b10b3e 100755 (executable)
@@ -129,9 +129,9 @@ public class PCLRenderer extends PrintRenderer
                            PDFPathPaint stroke)
     {
                if ( x1 == x2 )
-                       addRect(x1, y1, th, y2 - y1 + 1, stroke, stroke);
+                       addRect(x1 - (th/2), y1, th, y2 - y1 + 1, stroke, stroke);
                else if ( y1 == y2 )
-                       addRect(x1, y1, x2 - x1 + 1, th, stroke, stroke);
+                       addRect(x1, y1 + (th/2), x2 - x1 + 1, th, stroke, stroke);
     }
 
     /**
@@ -176,12 +176,12 @@ public class PCLRenderer extends PrintRenderer
                                {
                                        if ( start + len > y2 )
                                                len = y2 - start;
-                                       addRect(x1, start, th, len, stroke, stroke);
+                                       addRect(x1 - (th/2), start, th, len, stroke, stroke);
                                        start += (len + dashoff * th);
                                }
                        }
                        else
-                               addRect(x1, y1, th, y2 - y1 + 1, stroke, stroke);
+                               addRect(x1 - (th/2), y1, th, y2 - y1 + 1, stroke, stroke);
                }
                else if ( y1 == y2 )
                {
@@ -193,12 +193,12 @@ public class PCLRenderer extends PrintRenderer
                                {
                                        if ( start + len > x2 )
                                                len = x2 - start;
-                                       addRect(start, y1, len, th, stroke, stroke);
+                                       addRect(start, y1 + (th/2), len, th, stroke, stroke);
                                        start += (len + dashoff * th);
                                }
                        }
                        else
-                               addRect(x1, y1, x2 - x1 + 1, th, stroke, stroke);
+                               addRect(x1, y1 + (th/2), x2 - x1 + 1, th, stroke, stroke);
                }
     }