xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From adelme...@apache.org
Subject svn commit: r674272 - /xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
Date Sun, 06 Jul 2008 08:44:54 GMT
Author: adelmelle
Date: Sun Jul  6 01:44:54 2008
New Revision: 674272

URL: http://svn.apache.org/viewvc?rev=674272&view=rev
Log:
Redo changes made in r674056...

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java?rev=674272&r1=674271&r2=674272&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java Sun Jul  6
01:44:54 2008
@@ -245,15 +245,25 @@
         last here. */
         RegionViewport viewport;
         viewport = page.getRegionViewport(FO_REGION_BEFORE);
-        renderRegionViewport(viewport);
+        if (viewport != null) {
+            renderRegionViewport(viewport);
+        }
         viewport = page.getRegionViewport(FO_REGION_START);
-        renderRegionViewport(viewport);
+        if (viewport != null) {
+            renderRegionViewport(viewport);
+        }
         viewport = page.getRegionViewport(FO_REGION_END);
-        renderRegionViewport(viewport);
+        if (viewport != null) {
+            renderRegionViewport(viewport);
+        }
         viewport = page.getRegionViewport(FO_REGION_AFTER);
-        renderRegionViewport(viewport);
+        if (viewport != null) {
+            renderRegionViewport(viewport);
+        }
         viewport = page.getRegionViewport(FO_REGION_BODY);
-        renderRegionViewport(viewport);
+        if (viewport != null) {
+            renderRegionViewport(viewport);
+        }
     }
 
     /**
@@ -265,27 +275,25 @@
      * @param port  The region viewport to be rendered
      */
     protected void renderRegionViewport(RegionViewport port) {
-        if (port != null) {
-            Rectangle2D view = port.getViewArea();
-            // The CTM will transform coordinates relative to
-            // this region-reference area into page coords, so
-            // set origin for the region to 0,0.
-            currentBPPosition = 0;
-            currentIPPosition = 0;
-
-            RegionReference regionReference = port.getRegionReference();
-            handleRegionTraits(port);
-
-            //  shouldn't the viewport have the CTM
-            startVParea(regionReference.getCTM(), port.isClip() ? view : null);
-            // do after starting viewport area
-            if (regionReference.getRegionClass() == FO_REGION_BODY) {
-                renderBodyRegion((BodyRegion) regionReference);
-            } else {
-                renderRegion(regionReference);
-            }
-            endVParea();
+        Rectangle2D view = port.getViewArea();
+        // The CTM will transform coordinates relative to
+        // this region-reference area into page coords, so
+        // set origin for the region to 0,0.
+        currentBPPosition = 0;
+        currentIPPosition = 0;
+
+        RegionReference regionReference = port.getRegionReference();
+        handleRegionTraits(port);
+
+        //  shouldn't the viewport have the CTM
+        startVParea(regionReference.getCTM(), port.isClip() ? view : null);
+        // do after starting viewport area
+        if (regionReference.getRegionClass() == FO_REGION_BODY) {
+            renderBodyRegion((BodyRegion) regionReference);
+        } else {
+            renderRegion(regionReference);
         }
+        endVParea();
     }
 
     /**
@@ -500,7 +508,7 @@
         int saveBP = currentBPPosition;
 
         // Calculate the position of the content rectangle.
-        if (parent != null && !Boolean.TRUE.equals(parent.getTrait(Trait.IS_VIEWPORT_AREA)))
{
+        if (parent != null && !parent.getTraitAsBoolean(Trait.IS_VIEWPORT_AREA))
{
             currentBPPosition += parent.getBorderAndPaddingWidthBefore();
             /* This is unnecessary now as we're going to use the *-indent traits
             currentIPPosition += parent.getBorderAndPaddingWidthStart();
@@ -556,7 +564,7 @@
                 // simply move position
                 currentBPPosition += block.getAllocBPD();
             }
-        } else if (Boolean.TRUE.equals(block.getTrait(Trait.IS_REFERENCE_AREA))) {
+        } else if (!block.getTraitAsBoolean(Trait.IS_REFERENCE_AREA)) {
             renderReferenceArea(block);
         } else {
             // save position and offset



---------------------------------------------------------------------
To unsubscribe, e-mail: fop-commits-unsubscribe@xmlgraphics.apache.org
For additional commands, e-mail: fop-commits-help@xmlgraphics.apache.org


Mime
View raw message