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 Finn Bock <bc...@worldonline.dk> on 2003/12/27 19:07:49 UTC

Which area rectangle does Block.height and Block.width specify?

Hi,

I was looking at some of the border issues and would like to ask for a 
little clarification of which of area rectangle that is described by 
Block.getHeight and Block.getWidth.

    http://www.w3.org/TR/2001/REC-xsl-20011015/slice4.html#area-geo

 From looking at the layout managers it seems to specify the content 
rectangle but the border code in PDFRendere interprets the values as the 
allocation rectangle.

I would guess that that values should be the size of content rectangle.

regards,
finn


RE: Which area rectangle does Block.height and Block.width specify?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Andreas L. Delmelle [mailto:a_l.delmelle@pandora.be]
>
> > -----Original Message-----
> > From: Finn Bock [mailto:bckfnn@worldonline.dk]
> >
> > I was looking at some of the border issues and would like to ask for a
> > little clarification of which of area rectangle that is described by
> > Block.getHeight and Block.getWidth.
> >
<snip />
> >
> > I would guess that that values should be the size of content rectangle.
> >
>
> Having had a first look, I wouldn't be too sure... If you want to draw a
> border, you want it to take into account the padding (if present), no? At
> the time the PDFRenderer renders the borders it should draw these
> along the large-allocation-rectangle, not the content rectangle. So, I
> would definitely go check if Block.getHeight and Block.getWidth already
> take into account the specified or inherited padding...
>

On a second peek into
fop.area.Block
fop.area.BlockParent
fop.area.Area
fop.layoutmgr.BlockLayoutManager

Block.setWidth is fed the IPD of the parent Area in BlockLayoutManager.java,
and the IPD is indeed defined as <q>the inline-progression-dimension of the
*content* rectangle for each area generated by this formatting object</q>[1]

But this would be the content rectangle of the *parent* area, hence the
confusion.

Anyone?

Cheers,

Andreas

[1]
http://www.w3.org/TR/2001/REC-xsl-20011015/slice7.html#inline-progression-di
mension


RE: Which area rectangle does Block.height and Block.width specify?

Posted by "Andreas L. Delmelle" <a_...@pandora.be>.
> -----Original Message-----
> From: Finn Bock [mailto:bckfnn@worldonline.dk]
>
> I was looking at some of the border issues and would like to ask for a
> little clarification of which of area rectangle that is described by
> Block.getHeight and Block.getWidth.
>
>     http://www.w3.org/TR/2001/REC-xsl-20011015/slice4.html#area-geo
>
>  From looking at the layout managers it seems to specify the content
> rectangle but the border code in PDFRendere interprets the values as the
> allocation rectangle.
>
> I would guess that that values should be the size of content rectangle.
>

Having had a first look, I wouldn't be too sure... If you want to draw a
border, you want it to take into account the padding (if present), no? At
the time the PDFRenderer renders the borders it should draw these along the
large-allocation-rectangle, not the content rectangle. So, I would
definitely go check if Block.getHeight and Block.getWidth already take into
account the specified or inherited padding...

Perhaps someone else can clarify this further?

Cheers,

Andreas