aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/area
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-08-24 18:04:07 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-08-24 18:04:07 +0000
commitb221e8cfc7ab2ec3eb6ebdc5a3bc384c5d5b9c04 (patch)
treefdbb48a72a7e874c415faddc2c6e251f6d71935a /src/java/org/apache/fop/area
parent4df83a2c29a65be00724e50ad9abb818f5a53cca (diff)
downloadxmlgraphics-fop-b221e8cfc7ab2ec3eb6ebdc5a3bc384c5d5b9c04.tar.gz
xmlgraphics-fop-b221e8cfc7ab2ec3eb6ebdc5a3bc384c5d5b9c04.zip
make area/CTM.getCTMandRelDims() more general by decoupling it from fo/PropertyManager
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196832 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/area')
-rw-r--r--src/java/org/apache/fop/area/CTM.java12
1 files changed, 6 insertions, 6 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));
}
}