import java.awt.geom.AffineTransform;
import org.apache.fop.datastructs.Node;
+import org.apache.fop.datatypes.IntegerType;
import org.apache.fop.fo.FONode;
+import org.apache.fop.fo.PropNames;
+import org.apache.fop.fo.expr.PropertyException;
import org.apache.fop.fo.flow.FoPageSequence;
/**
Node parent,
Object sync) {
super(pageSeq, generatedBy, parent, sync);
- // TODO Auto-generated constructor stub
+ contentOrientation = setContentOrientation();
+ frameOrientation = setFrameOrientation();
+ // What transform is required?
+ // TODO work out the transformation
+ // TODO check for reference-area rotational transformation
+ // in interactions between AreaFrames and ContentAreas
}
+ private int contentOrientation;
+ private int frameOrientation;
+
/**
* Set the Coordinate Transformation Matrix which transforms content
* coordinates in this reference area which are specified in
}
}
+ private int setContentOrientation() {
+ try {
+ return IntegerType.getIntValue(
+ generatedBy.getPropertyValue(
+ PropNames.REFERENCE_ORIENTATION));
+ } catch (PropertyException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public int getContentOrientation() {
+ return contentOrientation;
+ }
+
+ private int setFrameOrientation() {
+ try {
+ return IntegerType.getIntValue(
+ ((FONode)generatedBy.getParent()).getPropertyValue(
+ PropNames.REFERENCE_ORIENTATION));
+ } catch (PropertyException e) {
+ throw new RuntimeException(e);
+ }
+ }
+
+ public int getFrameOrientation() {
+ return frameOrientation;
+ }
+
/**
* Clone this reference area.
*