aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org/apache/fop/fo/pagination/Region.java
diff options
context:
space:
mode:
authorWilliam Victor Mote <vmote@apache.org>2003-08-27 01:51:06 +0000
committerWilliam Victor Mote <vmote@apache.org>2003-08-27 01:51:06 +0000
commitc62845df2a4bf856320d2bfba24b3a2a49294177 (patch)
tree6a1292aad56def82f0fc80199589d94d85d7802c /src/java/org/apache/fop/fo/pagination/Region.java
parent73fc28f7963ef7cbf96b9f241ceba2c9280823fd (diff)
downloadxmlgraphics-fop-c62845df2a4bf856320d2bfba24b3a2a49294177.tar.gz
xmlgraphics-fop-c62845df2a4bf856320d2bfba24b3a2a49294177.zip
move makeRegionViewport() and setRegionViewportTraits() from fo/pagination/Region to layoutmgr/PageLayoutManager
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@196860 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org/apache/fop/fo/pagination/Region.java')
-rw-r--r--src/java/org/apache/fop/fo/pagination/Region.java37
1 files changed, 1 insertions, 36 deletions
diff --git a/src/java/org/apache/fop/fo/pagination/Region.java b/src/java/org/apache/fop/fo/pagination/Region.java
index 8c7043875..3ae25fdd4 100644
--- a/src/java/org/apache/fop/fo/pagination/Region.java
+++ b/src/java/org/apache/fop/fo/pagination/Region.java
@@ -59,13 +59,9 @@ import org.apache.fop.datatypes.FODimension;
import org.apache.fop.fo.FObj;
import org.apache.fop.fo.FONode;
import org.apache.fop.fo.FOTreeVisitor;
-import org.apache.fop.fo.properties.CommonBorderAndPadding;
-import org.apache.fop.fo.properties.CommonBackground;
import org.apache.fop.apps.FOPException;
import org.apache.fop.area.CTM;
-import org.apache.fop.area.RegionViewport;
import org.apache.fop.area.RegionReference;
-import org.apache.fop.layoutmgr.TraitSetter;
// SAX
import org.xml.sax.Attributes;
@@ -133,44 +129,13 @@ public abstract class Region extends FObj {
+ parent.getName());
}
this.wm = this.properties.get("writing-mode").getEnum();
- }
-
- /**
- * Creates a RegionViewport Area object for this pagination Region.
- * @param reldims relative dimensions
- * @param pageCTM page coordinate transformation matrix
- * @return the new region viewport
- */
- public RegionViewport makeRegionViewport(FODimension reldims, CTM pageCTM) {
- Rectangle2D relRegionRect = getViewportRectangle(reldims);
- Rectangle2D absRegionRect = pageCTM.transform(relRegionRect);
- // Get the region viewport rectangle in absolute coords by
- // transforming it using the page CTM
- RegionViewport rv = new RegionViewport(absRegionRect);
- setRegionViewportTraits(rv);
- return rv;
- }
-
- /**
- * Set the region viewport traits.
- * The viewport has the border, background and
- * clipping overflow traits.
- *
- * @param r the region viewport
- */
- protected void setRegionViewportTraits(RegionViewport r) {
- // Common Border, Padding, and Background Properties
- CommonBorderAndPadding bap = propMgr.getBorderAndPadding();
- CommonBackground bProps = propMgr.getBackgroundProps();
- TraitSetter.addBorders(r, bap);
- TraitSetter.addBackground(r, bProps);
// this.properties.get("clip");
// this.properties.get("display-align");
this.overflow = this.properties.get("overflow").getEnum();
}
- protected abstract Rectangle getViewportRectangle(FODimension pageRefRect);
+ public abstract Rectangle getViewportRectangle(FODimension pageRefRect);
/**
* Create the region reference area for this region master.