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 Kevin Flanagan <KW...@us.fortis.com> on 1999/11/30 20:05:38 UTC

Re: Bug in 'layout' when in table cell - Background color property -Reply

Why not use pixels.  If needed information can be read as to the
resolution being used??  If not, even fonts and height once set can be
read in in pixels can it not??

Just thinking out loud. :)

>>> "Eric SCHAEFFER" <es...@posterconseil.com> 11/30/99
06:03am >>>
Hum, difficult problem. I thought about creating the length property with a
'base' unit (as the font size, for example, for 'em' unit). Like this, we
can compute correctly the length value ('em', '%', 'auto', ...). But it's
just changing the problem : how to know the good 'base' unit to use
when
creating the property...

Eric.

_______________________________________

Eric SCHAEFFER
eschaeffer@posterconseil.com

POSTER CONSEIL
118 rue de Tocqueville
75017 PARIS
FRANCE
Tel. : 33-140541058
Fax : 33-140541059
_______________________________________

----- Original Message -----
From: James Tauber <jt...@jtauber.com>
To: <fo...@xml.apache.org>
Sent: Tuesday, November 30, 1999 12:49 PM
Subject: Re: Bug in 'layout' when in table cell - Background color property


> > Yes, but if I want to have a table with two columns, each one with a
> column
> > width of 50%, and a table width of 90%, how do I calculate the
computed
> > length ? Percentages are relative to the container width (area or area
> > container), and not a XSL property. I need to have access to the
width
of
> > the parent area.
> >
> > Am I wrong ?
>
> No, you are correct. I thought you were talking about percentages of
XSL
> properties.
>
> Percentages of area traits is more tricky. We need some way of
making a
> Length express not just an absolute length but a percentage. One
problem
is
> that sometimes a percentage in a length *does* mean relative to an XSL
> property (not a trait). For example, a line-height of 120% means 120%
of
the
> font-size property. So it is something that is dependent on the property.
We
> need to be able to say "when column-width is a percentage, create a
Length
> that isn't really a length but is a percentage that will be used to
> calculate the real value once the containing area's width is known".
>
> One possible solution, but it seems to be a hack, would be for Length
to
> have a method isPercentage() that returns a boolean and a pvalue()
method
> that returns the percentage. Then a special contructor is used to
create a
> "percentage Length". When TableCell is laying out its child Blocks it
could
> call isPercentage() on the column-width property and if it returns true,
> pvalue() is called and multiplied by the containing area's width rather
than
> just using the mvalue().
>
> I am just thinking out loud here. I don't know if this is the best
approach.
>
> James
>


****************************************************************
			Please Note
The information in this E-mail message is legally privileged
and confidential information intended only for the use of the
individual(s) named above. If you, the reader of this message,
are not the intended recipient, you are hereby notified that 
you should not further disseminate, distribute, or forward this
E-mail message. If you have received this E-mail in error,
please notify the sender. Thank you
*****************************************************************