Design proposal: WAS: Re: updateBackgroundColor mechanism is badly flawed

From: j.m.maurer (
Date: Mon Jul 29 2002 - 10:25:28 EDT

  • Next message: Tomas Frydrych: "commit: speedup fl_DocSectionLayout::redrawUpdate()"

    Op ma 29-07-2002, om 15:47 schreef Tomas Frydrych:
    > The updateBackgroundColor mechanism seems to be very seriously
    > flawed and needs to be rewritten, as it is one of the main bottlenecks
    > in the code.
    > The problem is this: the various calls to updateBackgroundColor()
    > propagate down to the run level, where
    > fp_Run::updateBackgroundColor() querries the PieceTable (!!!) for
    > the background colour property. This is not the way it should be --

    I know this is not the right way to do stuff, but at this moment, it's
    the only way to do it. It is needed for text that is within a table
    cell: when a run clears a region that needs to be cleared, it does so
    using the background color of the page, or the currently set highlight
    color. The problem is: it must use the current cell background color if
    the text is in a cell that has a background color set!

    My proposal is (and i've already discussed this a bit with Martin and
    Dom), that the run (or whatever container) should NOT clear the region
    itself, but the container it is in (it's parent container) should clear
    the region. If that container does not know how clear the region, then
    it's parent container should clear the region.

    (I guess this sounds incomprehenisble(?)...)

    Take for example a table cell that has an *image* set as a background
    (which we currently cannot do). When a run in that cell wants to clear a
    region, it uses the highlight color, the page color or the cell
    background color as described above. Of course this is WRONG! The region
    must be cleared with the image contents of that region! So, the run
    should propagate it's request up to the cell, which knows it has an
    image as a background. The cell would finally ask the image to repaint
    the specific region the run requested...

    Is this the way to go, or doesn't it make sense?


    This archive was generated by hypermail 2.1.4 : Mon Jul 29 2002 - 10:31:15 EDT