aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-08-27 15:55:34 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-08-27 15:55:34 +0000
commit9e0f69ae48b64597f30a575e942fae76305d5db7 (patch)
treeedd2b6716e8e658562ab1895532684e1ab22abfc /src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
parentdf97fe5c1e4c17b504950f661d4a8856357e2705 (diff)
downloadxmlgraphics-fop-9e0f69ae48b64597f30a575e942fae76305d5db7.tar.gz
xmlgraphics-fop-9e0f69ae48b64597f30a575e942fae76305d5db7.zip
move fo/pagination/Region.setRegionPosition() to layoutmgr/PageLayoutManager
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196862 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/layoutmgr/PageLayoutManager.java')
-rw-r--r--src/java/org/apache/fop/layoutmgr/PageLayoutManager.java19
1 files changed, 17 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
index c839ada34..a1825b965 100644
--- a/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/PageLayoutManager.java
@@ -844,7 +844,7 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
Rectangle2D absRegVPRect) {
// Should set some column stuff here I think, or put it elsewhere
BodyRegion body = new BodyRegion();
- r.setRegionPosition(body, absRegVPRect);
+ setRegionPosition(r, body, absRegVPRect);
int columnCount =
r.properties.get("column-count").getNumber().intValue();
if ((columnCount > 1) && (r.overflow == Overflow.SCROLL)) {
@@ -872,8 +872,23 @@ public class PageLayoutManager extends AbstractLayoutManager implements Runnable
public RegionReference makeRegionReferenceArea(Region r,
Rectangle2D absRegVPRect) {
RegionReference rr = new RegionReference(r.getRegionAreaClass());
- r.setRegionPosition(rr, absRegVPRect);
+ setRegionPosition(r, rr, absRegVPRect);
return rr;
}
+ /**
+ * Set the region position inside the region viewport.
+ * This sets the trasnform that is used to place the contents of
+ * the region.
+ *
+ * @param r the region reference area
+ * @param absRegVPRect the rectangle to place the region contents
+ */
+ public void setRegionPosition(Region r, RegionReference rr,
+ Rectangle2D absRegVPRect) {
+ FODimension reldims = new FODimension(0, 0);
+ rr.setCTM(CTM.getCTMandRelDims(r.getPropertyManager().getAbsRefOrient(),
+ r.getPropertyManager().getWritingMode(), absRegVPRect, reldims));
+ }
+
}