xmlgraphics-fop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jerem...@apache.org
Subject svn commit: r749012 - in /xmlgraphics/fop/trunk: ./ src/java/org/apache/fop/fo/flow/ src/java/org/apache/fop/layoutmgr/inline/ src/java/org/apache/fop/render/ test/layoutengine/standard-testcases/
Date Sun, 01 Mar 2009 12:25:30 GMT
Author: jeremias
Date: Sun Mar  1 12:25:29 2009
New Revision: 749012

URL: http://svn.apache.org/viewvc?rev=749012&view=rev
Log:
Fixed BPD trait and border painting for leaders with leader-pattern="space" (and similar cases).
 

Modified:
    xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
    xmlgraphics/fop/trunk/src/java/org/apache/fop/render/AbstractRenderer.java
    xmlgraphics/fop/trunk/status.xml
    xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/leader_border_padding.xml

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java?rev=749012&r1=749011&r2=749012&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java (original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/fo/flow/Leader.java Sun Mar  1 12:25:29
2009
@@ -73,6 +73,7 @@
         leaderLength = pList.get(PR_LEADER_LENGTH).getLengthRange();
         leaderPattern = pList.get(PR_LEADER_PATTERN).getEnum();
         leaderPatternWidth = pList.get(PR_LEADER_PATTERN_WIDTH).getLength();
+        ruleThickness = pList.get(PR_RULE_THICKNESS).getLength();
         switch(leaderPattern) {
         case EN_SPACE:
             // use Space
@@ -81,7 +82,6 @@
             // the following properties only apply
             // for leader-pattern = "rule"
             ruleStyle = pList.get(PR_RULE_STYLE).getEnum();
-            ruleThickness = pList.get(PR_RULE_THICKNESS).getLength();
             break;
         case EN_DOTS:
             break;

Modified: xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java?rev=749012&r1=749011&r2=749012&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
(original)
+++ xmlgraphics/fop/trunk/src/java/org/apache/fop/layoutmgr/inline/LeaderLayoutManager.java
Sun Mar  1 12:25:29 2009
@@ -120,17 +120,15 @@
                 org.apache.fop.area.inline.Leader leader
                     = new org.apache.fop.area.inline.Leader();
                 leader.setRuleStyle(fobj.getRuleStyle());
-                leader.setRuleThickness(fobj.getRuleThickness().getValue(this));
-                leader.setBPD(fobj.getRuleThickness().getValue(this));
                 leaderArea = leader;
             } else {
                 leaderArea = new Space();
-                leaderArea.setBPD(1);
             }
+            leaderArea.setBPD(fobj.getRuleThickness().getValue(this));
             leaderArea.addTrait(Trait.COLOR, fobj.getColor());
         } else if (fobj.getLeaderPattern() == EN_SPACE) {
             leaderArea = new Space();
-            leaderArea.setBPD(1);
+            leaderArea.setBPD(fobj.getRuleThickness().getValue(this));
         } else if (fobj.getLeaderPattern() == EN_DOTS) {
             TextArea t = new TextArea();
             char dot = '.'; // userAgent.getLeaderDotCharacter();
@@ -198,7 +196,7 @@
             } else {
                 //Content collapsed to nothing, so use a space
                 leaderArea = new Space();
-                leaderArea.setBPD(1);
+                leaderArea.setBPD(fobj.getRuleThickness().getValue(this));
             }
         }
         TraitSetter.setProducerID(leaderArea, fobj.getId());

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=749012&r1=749011&r2=749012&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 Mar  1
12:25:29 2009
@@ -29,8 +29,11 @@
 import java.util.List;
 import java.util.Set;
 
+import org.w3c.dom.Document;
+
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
+
 import org.apache.fop.apps.FOPException;
 import org.apache.fop.apps.FOUserAgent;
 import org.apache.fop.area.Area;
@@ -66,7 +69,6 @@
 import org.apache.fop.events.ResourceEventProducer;
 import org.apache.fop.fo.Constants;
 import org.apache.fop.fonts.FontInfo;
-import org.w3c.dom.Document;
 
 /**
  * Abstract base class for all renderers. The Abstract renderer does all the
@@ -648,7 +650,6 @@
      * @param space the space to render
      */
     protected void renderInlineSpace(Space space) {
-        space.setBPD(0);
         renderInlineAreaBackAndBorders(space);
         // an inline space moves the inline progression position
         // for the current block by the width or height of the space

Modified: xmlgraphics/fop/trunk/status.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/status.xml?rev=749012&r1=749011&r2=749012&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/status.xml (original)
+++ xmlgraphics/fop/trunk/status.xml Sun Mar  1 12:25:29 2009
@@ -58,6 +58,10 @@
       documents. Example: the fix of marks layering will be such a case when it's done.
     -->
     <release version="FOP Trunk" date="TBD">
+      <action context="Layout" dev="JM" type="fix">
+        Fixed BPD trait and border painting for leaders with leader-pattern="space"
+        (and similar cases).  
+      </action>
       <action context="Renderers" dev="JM" type="add">
         AFP Output: Added support for Invoke Medium Map (IMM). 
       </action>

Modified: xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/leader_border_padding.xml
URL: http://svn.apache.org/viewvc/xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/leader_border_padding.xml?rev=749012&r1=749011&r2=749012&view=diff
==============================================================================
--- xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/leader_border_padding.xml (original)
+++ xmlgraphics/fop/trunk/test/layoutengine/standard-testcases/leader_border_padding.xml Sun
Mar  1 12:25:29 2009
@@ -130,7 +130,9 @@
     <eval expected="360000" xpath="//flow/block[4]/lineArea/@ipd"/>
     <eval expected="34000" xpath="//flow/block[4]/lineArea/space/@ipd"/>
     <eval expected="36000" xpath="//flow/block[4]/lineArea/space/@ipda"/>
-    <eval expected="8615" xpath="//flow/block[4]/lineArea/space/@offset"/>
+    <eval expected="1000" xpath="//flow/block[4]/lineArea/space/@bpd"/>
+    <eval expected="3000" xpath="//flow/block[4]/lineArea/space/@bpda"/>
+    <eval expected="7616" xpath="//flow/block[4]/lineArea/space/@offset"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-before"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[4]/lineArea/space/@border-end"/>
@@ -192,7 +194,9 @@
     <eval expected="360000" xpath="//flow/block[9]/lineArea/@ipd"/>
     <eval expected="16000" xpath="//flow/block[9]/lineArea/space/@ipd"/>
     <eval expected="36000" xpath="//flow/block[9]/lineArea/space/@ipda"/>
-    <eval expected="8615" xpath="//flow/block[9]/lineArea/space/@offset"/>
+    <eval expected="1000" xpath="//flow/block[9]/lineArea/space/@bpd"/>
+    <eval expected="21000" xpath="//flow/block[9]/lineArea/space/@bpda"/>
+    <eval expected="7616" xpath="//flow/block[9]/lineArea/space/@offset"/>
     <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[9]/lineArea/space/@border-after"/>
     <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[9]/lineArea/space/@border-before"/>
     <eval expected="(solid,#ff0000,5000)" xpath="//flow/block[9]/lineArea/space/@border-end"/>
@@ -262,7 +266,9 @@
     <eval expected="360000" xpath="//flow/block[14]/lineArea/@ipd"/>
     <eval expected="24000" xpath="//flow/block[14]/lineArea/space/@ipd"/>
     <eval expected="36000" xpath="//flow/block[14]/lineArea/space/@ipda"/>
-    <eval expected="8615" xpath="//flow/block[14]/lineArea/space/@offset"/>
+    <eval expected="1000" xpath="//flow/block[14]/lineArea/space/@bpd"/>
+    <eval expected="9000" xpath="//flow/block[14]/lineArea/space/@bpda"/>
+    <eval expected="7616" xpath="//flow/block[14]/lineArea/space/@offset"/>
     <eval expected="(solid,#ff0000,3000)" xpath="//flow/block[14]/lineArea/space/@border-after"/>
     <eval expected="(solid,#ff0000,1000)" xpath="//flow/block[14]/lineArea/space/@border-before"/>
     <eval expected="(solid,#ff0000,2000)" xpath="//flow/block[14]/lineArea/space/@border-end"/>



---------------------------------------------------------------------
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