aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop
diff options
context:
space:
mode:
authorKaren Lease <klease@apache.org>2001-03-23 21:17:40 +0000
committerKaren Lease <klease@apache.org>2001-03-23 21:17:40 +0000
commit91606493009417de7ebf9ffbbd633f124c916376 (patch)
tree11972adb20d7c5c89eb9a8082a70a83f14829ebb /src/org/apache/fop
parentbd3f6e8a9b2b7a5182b25f51859eb5215676f257 (diff)
downloadxmlgraphics-fop-91606493009417de7ebf9ffbbd633f124c916376.tar.gz
xmlgraphics-fop-91606493009417de7ebf9ffbbd633f124c916376.zip
Submitted by: Art Welch
Offset by half border width in doFrame git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194173 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/org/apache/fop')
-rw-r--r--src/org/apache/fop/render/PrintRenderer.java22
1 files changed, 13 insertions, 9 deletions
diff --git a/src/org/apache/fop/render/PrintRenderer.java b/src/org/apache/fop/render/PrintRenderer.java
index b4792048b..11e3f2cda 100644
--- a/src/org/apache/fop/render/PrintRenderer.java
+++ b/src/org/apache/fop/render/PrintRenderer.java
@@ -270,25 +270,29 @@ public abstract class PrintRenderer implements Renderer
this.addRect(rx, ry, w, -h, new PDFColor(bg), new PDFColor(bg));
}
- rx = rx - area.getBorderLeftWidth();
- ry = ry + area.getBorderTopWidth();
- w = w + area.getBorderLeftWidth() + area.getBorderRightWidth();
- h = h + area.getBorderTopWidth() + area.getBorderBottomWidth();
+ //rx = rx - area.getBorderLeftWidth();
+ //ry = ry + area.getBorderTopWidth();
+ //w = w + area.getBorderLeftWidth() + area.getBorderRightWidth();
+ //h = h + area.getBorderTopWidth() + area.getBorderBottomWidth();
// Handle line style
// Offset for haft the line width!
- BorderAndPadding bp = area.getBorderAndPadding();
+ BorderAndPadding bp = area.getBorderAndPadding();
+ int left = rx - area.getBorderLeftWidth() / 2;
+ int right = rx + w + area.getBorderRightWidth() / 2;
+ int top = ry + area.getBorderTopWidth() / 2;
+ int bottom = ry - h - area.getBorderBottomWidth() / 2;
if (area.getBorderTopWidth() != 0)
- addLine(rx, ry, rx + w, ry, area.getBorderTopWidth(),
+ addLine(left, top, right, top, area.getBorderTopWidth(),
new PDFColor(bp.getBorderColor(BorderAndPadding.TOP)));
if (area.getBorderLeftWidth() != 0)
- addLine(rx, ry, rx, ry - h, area.getBorderLeftWidth(),
+ addLine(left, ry + area.getBorderTopWidth(), left, bottom, area.getBorderLeftWidth(),
new PDFColor(bp.getBorderColor(BorderAndPadding.LEFT)));
if (area.getBorderRightWidth() != 0)
- addLine(rx + w, ry, rx + w, ry - h, area.getBorderRightWidth(),
+ addLine(right, ry + area.getBorderTopWidth(), right, bottom, area.getBorderRightWidth(),
new PDFColor(bp.getBorderColor(BorderAndPadding.RIGHT)));
if (area.getBorderBottomWidth() != 0)
- addLine(rx, ry - h, rx + w, ry - h, area.getBorderBottomWidth(),
+ addLine(rx - area.getBorderLeftWidth(), bottom, rx + w + area.getBorderRightWidth(), bottom, area.getBorderBottomWidth(),
new PDFColor(bp.getBorderColor(BorderAndPadding.BOTTOM)));
}