You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2003/12/29 19:57:37 UTC

DO NOT REPLY [Bug 25802] New: - [PATCH] margin, indents and padding fixes for blocks.

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25802>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=25802

[PATCH] margin, indents and padding fixes for blocks.

           Summary: [PATCH] margin, indents and padding fixes for blocks.
           Product: Fop
           Version: 1.0dev
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: page-master/layout
        AssignedTo: fop-dev@xml.apache.org
        ReportedBy: bckfnn@worldonline.dk


This patch fixes a large number of issues regard the size and location of
margins, borders and padding for blok elements.

It contains the following changes:

1) Two new traits, SPACE_START and SPACE_END which on blocks contains
   the distances from the allocation box to the border box.
2) A TraitSetter.addMargins which assign values to the two new traits.
3) A dirty hack for computing start-indent and end-indent in 
   PropertyManager.getMarginProps(). This hack should be removed when
   the computation of start-indent and end-indent is implemented correctly
   in StartIndentMaker and EndIndentMaker.
4) A new method CommonBorderAndPadding.getBPPaddingAndBorder() which returns
   the sum of all the padding and border size values in the BP direction. 
   The value is used by the block LMs to increase the area height.
5) Change the method signature of AbstractRenderer.renderBlocks() to
   also take the parent block (if the parent is a block).
   This will allow renderBlocks in PDFRenderer to correctly add 
   margin+border+padding to the XXMarginOffset and to restore the values
   at the end of the block.
6) Implemented the margin offseting in PDFRenderer.renderBlocks(), rather than
   doing it as a sideeffect in handleBlockTrait().

The changes in AbstractRenderer probably break the border and padding in
the other renderers. I have only tested with pdf output.