pbwest 2004/04/29 17:34:51 Modified: src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design ReferenceArea.java Area.java AbstractReferenceArea.java Log: Changing from Adobe 1st quadrant co-ordinates to Java page co-ordinates (0,0 = right,top). Chages references to CoordTransformer to java.awt.geom.AffineTransform Revision Changes Path No revision No revision 1.1.2.5 +27 -12 xml-fop/src/java/org/apache/fop/area/Attic/ReferenceArea.java Index: ReferenceArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/ReferenceArea.java,v retrieving revision 1.1.2.4 retrieving revision 1.1.2.5 diff -u -r1.1.2.4 -r1.1.2.5 --- ReferenceArea.java 28 Feb 2004 02:06:44 -0000 1.1.2.4 +++ ReferenceArea.java 30 Apr 2004 00:34:50 -0000 1.1.2.5 @@ -19,29 +19,44 @@ */ package org.apache.fop.area; +import java.awt.geom.AffineTransform; + /** + * Interface for <code>reference-area</code>s; i.e. areas which provide a + * context for possible changes in <code>writing-mode</code> or + * <code>reference-orientation</code>. + * * @author pbw * @version $Revision$ $Name$ */ public interface ReferenceArea extends Cloneable { /** - * Set the Coordinate Transformation Matrix which transforms content - * coordinates in this reference area which are specified in - * terms of "start" and "before" into coordinates in a system which - * is positioned in "absolute" directions (with origin at lower left of - * the reference area. + * Java's text handling includes facilities for managing writing + * mode. <code>java.awt.ComponentOrientation</code> handles the + * standard FO writing methods - LT (lr-tb), RT (rl-tb) and TR (tb-rl), + * as well as TL (tb-lr - e.g. Mongolian). + * Because these are dealt with within the context of a page-based + * co-ordinate system (left,top = 0,0, right,bottom = x,y), there is + * no need to apply any Affine transform to discriminate these cases. + * <p>When a <code>reference-orientation</code> is applied, however, + * and an area is rotated with reference to its containing area, + * such a transform must be applied. + * <p>Transforms will also be required to map Java page co-ordinates to + * Adobe 1st quadrant co-ordinates for PDF and Postscript rendering. * - * @param matrix the current transform to position this region + * @param matrix the transform to map the contents of this reference-area + * into statndard Java page co-ordinates. */ - public void setCoordTransformer(CoordTransformer matrix); + public void setCoordTransformer(AffineTransform matrix); /** - * Get the current transformer of this reference area. + * Get the transform mapping this reference area into standard page + * co-ordinates. May return null. * - * @return the current transformer to position this reference area. + * @return the current transform of this reference area. */ - public CoordTransformer getCoordTransformer(); + public AffineTransform getCoordTransformer(); public Object clone(); 1.1.2.8 +0 -8 xml-fop/src/java/org/apache/fop/area/Area.java Index: Area.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Area.java,v retrieving revision 1.1.2.7 retrieving revision 1.1.2.8 diff -u -r1.1.2.7 -r1.1.2.8 --- Area.java 28 Feb 2004 02:06:44 -0000 1.1.2.7 +++ Area.java 30 Apr 2004 00:34:50 -0000 1.1.2.8 @@ -24,14 +24,6 @@ import org.apache.fop.fo.flow.FoPageSequence; /** - * @author pbw - * @version $Revision$ $Name$ - */ -/** - * @author pbw - * @version $Revision$ $Name$ - */ -/** * The base class for all areas. <code>Area</code> extends <code>Node</code> * because all areas will find themselves in a tree of some kind. * @author pbw 1.1.2.3 +7 -5 xml-fop/src/java/org/apache/fop/area/Attic/AbstractReferenceArea.java Index: AbstractReferenceArea.java =================================================================== RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/AbstractReferenceArea.java,v retrieving revision 1.1.2.2 retrieving revision 1.1.2.3 diff -u -r1.1.2.2 -r1.1.2.3 --- AbstractReferenceArea.java 28 Feb 2004 02:06:44 -0000 1.1.2.2 +++ AbstractReferenceArea.java 30 Apr 2004 00:34:50 -0000 1.1.2.3 @@ -18,6 +18,8 @@ */ package org.apache.fop.area; +import java.awt.geom.AffineTransform; + import org.apache.fop.datastructs.Node; import org.apache.fop.fo.FONode; import org.apache.fop.fo.flow.FoPageSequence; @@ -31,7 +33,7 @@ implements ReferenceArea { // Set up as identity matrix - protected CoordTransformer transformer = new CoordTransformer(); + protected AffineTransform transformer = new AffineTransform(); /** * @param pageSeq through which this area was generated @@ -57,7 +59,7 @@ * * @param transformer to position this reference area */ - public void setCoordTransformer(CoordTransformer transformer) { + public void setCoordTransformer(AffineTransform transformer) { synchronized (sync) { this.transformer = transformer; } @@ -68,7 +70,7 @@ * * @return the current transformer to position this reference area */ - public CoordTransformer getCoordTransformer() { + public AffineTransform getCoordTransformer() { synchronized (sync) { return this.transformer; }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]