aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2004-02-10 19:28:17 +0000
committerFinn Bock <bckfnn@apache.org>2004-02-10 19:28:17 +0000
commit9371a5de873c7c9e66d7b7fb49f74c71ac558015 (patch)
tree6e069a0a2b9a8c26a0ea3e24ec728204abcc3895 /src/java/org/apache
parent6df40ef8797c999bf2b2d77fa9159a4fe00fc6b0 (diff)
downloadxmlgraphics-fop-9371a5de873c7c9e66d7b7fb49f74c71ac558015.tar.gz
xmlgraphics-fop-9371a5de873c7c9e66d7b7fb49f74c71ac558015.zip
Draw the borders of a BlockViewport before setting the CTM
transformation. This way the viewport is relative to the current CTM and the content of the Viewport is relative to the viewport CTM. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197348 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache')
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderer.java37
1 files changed, 19 insertions, 18 deletions
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
index a97bb68b9..aff723b94 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
@@ -742,26 +742,29 @@ public class PDFRenderer extends PrintRenderer {
if (bv.getPositioning() == Block.ABSOLUTE) {
- currentIPPosition = 0;
- currentBPPosition = 0;
-
closeText();
- endTextObject();
+ CTM tempctm = new CTM(containingIPPosition, containingBPPosition);
+ ctm = tempctm.multiply(ctm);
+
+ float x = (float)(bv.getXOffset() + containingIPPosition) / 1000f;
+ float y = (float)(bv.getYOffset() + containingBPPosition) / 1000f;
+ float width = (float)bv.getWidth() / 1000f;
+ float height = (float)bv.getHeight() / 1000f;
+
+ drawBackAndBorders(bv, x, y, width, height);
+
+ endTextObject();
if (bv.getClip()) {
saveGraphicsState();
- float x = (float)(bv.getXOffset() + containingIPPosition) / 1000f;
- float y = (float)(bv.getYOffset() + containingBPPosition) / 1000f;
- float width = (float)bv.getWidth() / 1000f;
- float height = (float)bv.getHeight() / 1000f;
clip(x, y, width, height);
}
- CTM tempctm = new CTM(containingIPPosition, containingBPPosition);
- ctm = tempctm.multiply(ctm);
-
startVParea(ctm);
- handleBlockTraits(bv);
+
+ currentIPPosition = 0;
+ currentBPPosition = 0;
+
renderBlocks(bv, children);
endVParea();
@@ -777,11 +780,7 @@ public class PDFRenderer extends PrintRenderer {
} else {
if (ctm != null) {
- currentIPPosition = 0;
- currentBPPosition = 0;
-
closeText();
- endTextObject();
double[] vals = ctm.toArray();
//boolean aclock = vals[2] == 1.0;
@@ -798,7 +797,6 @@ public class PDFRenderer extends PrintRenderer {
if (bv.getClip()) {
if (ctm == null) {
closeText();
- endTextObject();
}
saveGraphicsState();
float x = (float)bv.getXOffset() / 1000f;
@@ -808,10 +806,13 @@ public class PDFRenderer extends PrintRenderer {
clip(x, y, width, height);
}
+ handleBlockTraits(bv);
if (ctm != null) {
+ endTextObject();
startVParea(ctm);
+ currentIPPosition = 0;
+ currentBPPosition = 0;
}
- handleBlockTraits(bv);
renderBlocks(bv, children);
if (ctm != null) {
endVParea();