You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-commits@xmlgraphics.apache.org by pb...@apache.org on 2004/06/06 19:09:30 UTC

cvs commit: xml-fop/src/java/org/apache/fop/area BlockArea.java

pbwest      2004/06/06 10:09:30

  Modified:    src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
                        BlockArea.java
  Log:
  Changed dimensions from float to double.
  Added contentSpace rectangle
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.8   +21 -14    xml-fop/src/java/org/apache/fop/area/Attic/BlockArea.java
  
  Index: BlockArea.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/BlockArea.java,v
  retrieving revision 1.1.2.7
  retrieving revision 1.1.2.8
  diff -u -r1.1.2.7 -r1.1.2.8
  --- BlockArea.java	1 Jun 2004 06:27:05 -0000	1.1.2.7
  +++ BlockArea.java	6 Jun 2004 17:09:30 -0000	1.1.2.8
  @@ -44,7 +44,9 @@
       }
   
       /** The page space allocation for layout of the block */
  -    private Rectangle2D pageSpace = new Rectangle2D.Float();
  +    private Rectangle2D pageSpace = new Rectangle2D.Double();
  +    /** The content space equivalent to the pageSpace */
  +    private Rectangle2D contentSpace = null;
   
   //    /**
   //     * Receives an allocation of page space from area parent
  @@ -59,6 +61,9 @@
        * child area.  <i>N.B.</i> <code>reference-area</code>s must override
        * this method to apply an <code>AffineTransform</code> to areas passed
        * up and returned.
  +     * <p>The requested space is the whole area required by the child, including
  +     * padding, borders and margins (spaces).  The area is allocated from the
  +     * content area of the parent.
        * @return
        */
       public Rectangle2D pageSpaceRequest(AreaRange spaceRange) {
  @@ -74,8 +79,10 @@
                   // they contain inline items which will go into the same
                   // line-area.  At this point, e.g., footnotes will be found.
               } else {
  +            	// The available space is sufficient to contain the mimimum
  +            	// layout from the child, but insufficient to contain all of it.
                   // Negotiate available space with the requester
  -
  +            	
               }
           } else { // Need more space from above.  Page may be full
               // Negotiate with parent for more space
  @@ -101,32 +108,32 @@
           
       }
   
  -    protected float getStartSpace() {
  +    protected double getStartSpace() {
           return getStartIndent() + getStartIntrusion();
       }
   
  -    protected float getEndSpace() {
  +    protected double getEndSpace() {
           return getEndIndent() + getEndIntrusion();
       }
   
  -    protected float getStartIndent() {
  +    protected double getStartIndent() {
           // Dummy start-indent
  -        return 10.0f;
  +        return 10.0;
       }
   
  -    protected float getEndIndent() {
  +    protected double getEndIndent() {
           // Dummy end-indent
  -        return 10.0f;
  +        return 10.0;
       }
   
  -    protected float getStartIntrusion() {
  +    protected double getStartIntrusion() {
           // dummy intrusion
  -        return 0.0f;
  +        return 0.0;
       }
   
  -    protected float getEndIntrusion() {
  +    protected double getEndIntrusion() {
           // dummy intrusion
  -        return 0.0f;
  +        return 0.0;
       }
   
   }
  
  
  

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