From 4df83a2c29a65be00724e50ad9abb818f5a53cca Mon Sep 17 00:00:00 2001 From: William Victor Mote Date: Sun, 24 Aug 2003 17:46:10 +0000 Subject: [PATCH] move property resolution logic from area/CTM.getCTMandRelDims() back to fo/PropertyManager git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196831 13f79535-47bb-0310-9956-ffa450edef68 --- src/java/org/apache/fop/area/CTM.java | 5 ++--- src/java/org/apache/fop/fo/PropertyManager.java | 8 ++++++-- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/java/org/apache/fop/area/CTM.java b/src/java/org/apache/fop/area/CTM.java index 07e142b66..2f5e07051 100644 --- a/src/java/org/apache/fop/area/CTM.java +++ b/src/java/org/apache/fop/area/CTM.java @@ -290,8 +290,7 @@ public class CTM implements Serializable { 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( - pm.getProperties().get("reference-orientation").getNumber().intValue()); + int absRefOrient = pm.getAbsRefOrient(); if (absRefOrient % 180 == 0) { width = (int) absVPrect.getWidth(); height = (int) absVPrect.getHeight(); @@ -327,7 +326,7 @@ public class CTM implements Serializable { } ctm = ctm.rotate(absRefOrient); } - int wm = pm.getProperties().get("writing-mode").getEnum(); + 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. diff --git a/src/java/org/apache/fop/fo/PropertyManager.java b/src/java/org/apache/fop/fo/PropertyManager.java index 11d11c82e..e9305d64c 100644 --- a/src/java/org/apache/fop/fo/PropertyManager.java +++ b/src/java/org/apache/fop/fo/PropertyManager.java @@ -511,8 +511,12 @@ public class PropertyManager { /** * Calculate absolute reference-orientation relative to media orientation. */ - public int getAbsRefOrient(int myRefOrient) { - return myRefOrient; + public int getAbsRefOrient() { + return properties.get("reference-orientation").getNumber().intValue(); + } + + public int getWritingMode() { + return properties.get("writing-mode").getEnum(); } } -- 2.39.5