pbwest      2004/06/29 00:41:46

  Modified:    src/java/org/apache/fop/area Tag: FOP_0-20-0_Alt-Design
                        BlockAllocationRectangle.java
  Log:
  Set up allocation-rectangle frame around content-rectangle.
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.1.2.2   +19 -3     
xml-fop/src/java/org/apache/fop/area/Attic/BlockAllocationRectangle.java
  
  Index: BlockAllocationRectangle.java
  ===================================================================
  RCS file: 
/home/cvs/xml-fop/src/java/org/apache/fop/area/Attic/BlockAllocationRectangle.java,v
  retrieving revision 1.1.2.1
  retrieving revision 1.1.2.2
  diff -u -r1.1.2.1 -r1.1.2.2
  --- BlockAllocationRectangle.java     17 Jun 2004 11:26:03 -0000      1.1.2.1
  +++ BlockAllocationRectangle.java     29 Jun 2004 07:41:45 -0000      1.1.2.2
  @@ -32,8 +32,24 @@
        * @param contents
        */
       public BlockAllocationRectangle(Area area) {
  +        // For block-areas, the allocation-area is bounded in the
  +        // block-progression-direction by the border-rectangle, and in the
  +        // inline-progression-direction by the spaces-rectangle.
  +        // See 4.2.3 Geometric Definitions
  +        // The contents of the BlockAllocationRectangle is the ContentRectangle.
  +        // Initally, set up the AreaFrame representing the allocation
  +        // rectangle to co-incide with the content-rectangle.
           super(area, area.getContent());
  -        
  +        // Now extend the AreaFrame to co-incide with the
  +        // edges of the border rectangle in the BPDir, and with the edges of
  +        // the spaces rectangle in the IPDir.
  +        PaddingRectangle padding = area.getPadding();
  +        BorderRectangle borders = area.getBorders();
  +        SpacesRectangle spaces = area.getSpaces();
  +        setStart(spaces.getStart() + borders.getStart() + padding.getStart());
  +        setEnd(spaces.getEnd() + borders.getEnd() + padding.getEnd());
  +        setBefore(borders.getBefore() + padding.getBefore());
  +        setAfter(borders.getAfter() + padding.getAfter());
       }
   
   }
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to