aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFinn Bock <bckfnn@apache.org>2004-02-04 13:06:36 +0000
committerFinn Bock <bckfnn@apache.org>2004-02-04 13:06:36 +0000
commit90ab183b428db3fb49d3b79ed89a2ddd9e241c35 (patch)
treefdc4b67575051c10d98d82fdb6c0b340c4f0fd35
parent66c0ad06ef217368b080339dd286f8a45fc8b6ae (diff)
downloadxmlgraphics-fop-90ab183b428db3fb49d3b79ed89a2ddd9e241c35.tar.gz
xmlgraphics-fop-90ab183b428db3fb49d3b79ed89a2ddd9e241c35.zip
Do the regiontraits before changes ctm because the ctm only apply for the
region reference area, not the viewport itself. git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197328 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/render/AbstractRenderer.java4
-rw-r--r--src/java/org/apache/fop/render/pdf/PDFRenderer.java7
2 files changed, 6 insertions, 5 deletions
diff --git a/src/java/org/apache/fop/render/AbstractRenderer.java b/src/java/org/apache/fop/render/AbstractRenderer.java
index 13b874379..5ed907c35 100644
--- a/src/java/org/apache/fop/render/AbstractRenderer.java
+++ b/src/java/org/apache/fop/render/AbstractRenderer.java
@@ -330,11 +330,11 @@ public abstract class AbstractRenderer extends AbstractLogEnabled
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 {
diff --git a/src/java/org/apache/fop/render/pdf/PDFRenderer.java b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
index e4979585c..a97bb68b9 100644
--- a/src/java/org/apache/fop/render/pdf/PDFRenderer.java
+++ b/src/java/org/apache/fop/render/pdf/PDFRenderer.java
@@ -546,9 +546,9 @@ public class PDFRenderer extends PrintRenderer {
*/
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 @@ public class PDFRenderer extends PrintRenderer {
bpMarginOffset = region.getBorderAndPaddingWidthBefore();
ipMarginOffset = region.getBorderAndPaddingWidthStart();
}
-
+ beginTextObject();
drawBackAndBorders(region, startx, starty, width, height);
+ endTextObject();
}
/**