Renaud Richardet wrote:

> Victor,
> in [1] you talked about dealing with the positioning of areas 
> during the AreaTree building. could you point me to the 
> classes in FOray that handle that logic?


> [1] 

Hi Renaud:

The main classes where you can see this logic are Area, AreaFixed, and
AreaFlexible. However some of the methods are overridden in subclasses, esp.
LineArea, since it is the pivot concept between BPD-stacking and
IPD-stacking Areas. See especially the methods that start with "br" (border
rectangle), "pr" (padding rectangle), "cr" (content rectangle), and "rr"
(render rectangle, a concept invented for dealing with adjustments to the
content rectangle for things like justification). See also the methods
setProgressionDimension, incrementProgressionDimension, setAnteriorSpace,
and incrementAnteriorSpace where the sizes of the area and its resolved
before or start space is stored.

I have to give you a bunch of caveats. There is still a bunch of the old
stuff in those classes that I haven't gotten around to removing yet. The
location computation stuff works reasonable well ATM, but a lot of the
supporting code has serious problems, so you will get NPEs, etc. with even
simple documents. This is a work in progress.

Also, I haven't implemented only some of the necessary writing-mode and
reference-orientation changes. I am kind of torn ATM between nailing this
down solidly and trying to get a usable release done.

>From a speed standpoint, FOray's approach may be sub-optimal. Each Area
computes its location relative to its parent's. The philosophy behind it is
that I want to store stuff only once, not so much to save memory, but more
to reduce confusion about the proper place to go for the data, and
(importantly) to get layout to the place where it doesn't know or care about
the location, orientation, or writing-mode of an area, only its size. At
some point, we may find that it is beneficial to cache the intermediate
computations for performance. It is not important to me ATM.

The ViewCVS of the classes mentioned is here:

Victor Mote

Reply via email to