aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/java/org/apache/fop/area/CTM.java12
-rw-r--r--src/java/org/apache/fop/fo/pagination/Region.java3
-rw-r--r--src/java/org/apache/fop/fo/pagination/SimplePageMaster.java3
-rw-r--r--src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java6
4 files changed, 14 insertions, 10 deletions
diff --git a/src/java/org/apache/fop/area/CTM.java b/src/java/org/apache/fop/area/CTM.java
index 2f5e07051..bb6acd808 100644
--- a/src/java/org/apache/fop/area/CTM.java
+++ b/src/java/org/apache/fop/area/CTM.java
@@ -285,12 +285,13 @@ public class CTM implements Serializable {
* @param reldims relative dimensions
* @return CTM the coordinate transformation matrix (CTM)
*/
- public static CTM getCTMandRelDims(PropertyManager pm, Rectangle2D absVPrect,
- FODimension reldims) {
+ public static CTM getCTMandRelDims(int absRefOrient,
+ int writingMode,
+ Rectangle2D absVPrect,
+ FODimension reldims) {
int width, height;
// We will use the absolute reference-orientation to set up the CTM.
// The value here is relative to its ancestor reference area.
- int absRefOrient = pm.getAbsRefOrient();
if (absRefOrient % 180 == 0) {
width = (int) absVPrect.getWidth();
height = (int) absVPrect.getHeight();
@@ -326,13 +327,12 @@ public class CTM implements Serializable {
}
ctm = ctm.rotate(absRefOrient);
}
- int wm = pm.getWritingMode();
/* Since we've already put adjusted width and height values for the
* top and left positions implied by the reference-orientation, we
* can set ipd and bpd appropriately based on the writing mode.
*/
- if (wm == WritingMode.LR_TB || wm == WritingMode.RL_TB) {
+ if (writingMode == WritingMode.LR_TB || writingMode == WritingMode.RL_TB) {
reldims.ipd = width;
reldims.bpd = height;
} else {
@@ -341,7 +341,7 @@ public class CTM implements Serializable {
}
// Set a rectangle to be the writing-mode relative version???
// Now transform for writing mode
- return ctm.multiply(CTM.getWMctm(wm, reldims.ipd, reldims.bpd));
+ return ctm.multiply(CTM.getWMctm(writingMode, reldims.ipd, reldims.bpd));
}
}
diff --git a/src/java/org/apache/fop/fo/pagination/Region.java b/src/java/org/apache/fop/fo/pagination/Region.java
index 28d60211d..c3c5bee2b 100644
--- a/src/java/org/apache/fop/fo/pagination/Region.java
+++ b/src/java/org/apache/fop/fo/pagination/Region.java
@@ -195,7 +195,8 @@ public abstract class Region extends FObj {
*/
protected void setRegionPosition(RegionReference r, Rectangle2D absRegVPRect) {
FODimension reldims = new FODimension(0, 0);
- r.setCTM(CTM.getCTMandRelDims(propMgr, absRegVPRect, reldims));
+ r.setCTM(CTM.getCTMandRelDims(propMgr.getAbsRefOrient(),
+ propMgr.getWritingMode(), absRegVPRect, reldims));
}
/**
diff --git a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java
index 44eb03717..bc58b0d5a 100644
--- a/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java
+++ b/src/java/org/apache/fop/fo/pagination/SimplePageMaster.java
@@ -149,7 +149,8 @@ public class SimplePageMaster extends FObj {
// Set up the CTM on the page reference area based on writing-mode
// and reference-orientation
FODimension reldims = new FODimension(0, 0);
- CTM pageCTM = CTM.getCTMandRelDims(propMgr, pageRefRect, reldims);
+ CTM pageCTM = CTM.getCTMandRelDims(propMgr.getAbsRefOrient(),
+ propMgr.getWritingMode(), pageRefRect, reldims);
// Create a RegionViewport/ reference area pair for each page region
diff --git a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
index 295bff909..f16acc3c4 100644
--- a/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
+++ b/src/java/org/apache/fop/layoutmgr/BlockContainerLayoutManager.java
@@ -100,7 +100,8 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
abProps.top, abProps.right - abProps.left,
abProps.bottom - abProps.top);
relDims = new FODimension(0, 0);
- absoluteCTM = CTM.getCTMandRelDims(pm, rect, relDims);
+ absoluteCTM = CTM.getCTMandRelDims(pm.getAbsRefOrient(),
+ pm.getWritingMode(), rect, relDims);
}
}
@@ -121,7 +122,8 @@ public class BlockContainerLayoutManager extends BlockStackingLayoutManager {
Rectangle2D rect = new Rectangle2D.Double(0, 0, context.getRefIPD(),
context.getStackLimit().opt);
relDims = new FODimension(0, 0);
- absoluteCTM = CTM.getCTMandRelDims(propManager, rect, relDims);
+ absoluteCTM = CTM.getCTMandRelDims(propManager.getAbsRefOrient(),
+ propManager.getWritingMode(), rect, relDims);
double[] vals = absoluteCTM.toArray();
MinOptMax stackLimit;