The problems reported here with e-g and padding / borders apply equally 
to i-f-o. It's not too hard to fix. While doing this I noticed that the 
code for the i-f-o LM and e-g LM is logically largely identical 
although some bits have been coded slightly differently.

Any concerns if I put a common LM for i-f-o, e-g that  into the LM 
inheritance hierarchy (working name ForeignContent LM, i.e. content not 
native of XSL-FO)?

So we have something like:
   i-f-o LM implements ForeignContent LM
   e-g LM implements ForeignContent LM
and 
   ForeignContent LM implements LeafNode LM.

This would allow all the code related to the viewport generation, 
content scaling, and rectangle sizing for i-f-o and e-g to be in one 
place only.

The i-f-o and e-g LMs would become very small basically only providing 
the image or foreignObject area to be placed into the viewport.

Manuel

On Fri, 2 Sep 2005 01:04 am, Jeremias Maerki wrote:
> Oh right. Again someone caught me shooting too fast from the hip.
> Damn. I will probably never manage to get that right. :-( It's good
> to have people around to pay attention.
>
> I wondered about the large-allocation-rectangle while reading through
> 6.3.2 but obviously forgot to check the docs for e-g and i-f-o.
> Sorry, Manuel, Vincent is right.
>
> On 01.09.2005 18:44:52 Vincent Hennebert wrote:
> > I'm not sure here. The fo:external-graphic uses the
> > large-allocation-rectangle (§ 6.6.5), that comprises padding and
> > border. This makes me say that in Manuel's example the fo:block's
> > bpd should be calculated with the second formula. The fo:block's
> > content forms a line whose line-stacking-strategy is max-height
> > (default). Thus its allocation rectangle should comprise the
> > image's border & padding (§ 4.5). And so does the block.
> >
> > I may be wrong, as this part of the spec is still somewhat unclear
> > to me. WDYT?
> >
> > Vincent
> >
> > Jeremias Maerki a écrit :
> > > Indeed, the normal allocation rectangle of an inline area is
> > > different than the one of a block area. See 4.3.2. Geometric
> > > Definitions in the 1.0 spec.
> > >
> > > Border and padding for an inline area seem to be outside the
> > > allocation rectangle in before and after directions. Interesting.
> > >
> > > On 01.09.2005 17:29:50 Manuel Mall wrote:
> > >>I have a follow-up question on this. If we have something as
> > >> simple(?) as this:
> > >>
> > >><fo:block background-color="orange">
> > >>   <fo:external-graphic
> > >>  src="../../resources/images/bgimg300dpi.jpg"
> > >>        border="solid 5pt"
> > >>        padding="5pt"
> > >>        background-color="white"/>
> > >></fo:block>
> > >>
> > >>would you expect the whole image including padding and borders to
> > >> be within the bounds of the enclosing block or only the actual
> > >> image to be in the block and the padding and borders to "stick
> > >> out" at the top and bottom. It seems xep takes the latter
> > >> approach and I am very uncertain in this area. Or to put it
> > >> differently is the BPD of the enclosing block
> > >>   bpd = image height + line-spacing
> > >>or
> > >>   bpd = image-height + top_and_bottom_borders +
> > >> top_and_bottom_padding + line-spacing
> > >>?
> > >>
> > >>Manuel
> > >><snip/>
> > >
> > > Jeremias Maerki
>
> Jeremias Maerki

Reply via email to