Re: RE : INS, caret colour, etc.

From: Tomas Frydrych (tomas@frydrych.uklinux.net)
Date: Fri Jan 24 2003 - 05:06:56 EST

  • Next message: Rui Miguel Seabra: "Re: (Fwd) Multilingual AbiWord? (Russian/Linux)"

    > Patrick Lam <plam@plam.lcs.mit.edu> wrote:

    > The problem was that I couldn't coordinate redraws with xors. That
    > is, when the window system went behind my back to redraw something
    > (for instance, if you obscure part of the caret) I couldn't redraw
    > just part of the caret; I don't think GTK, at least tells you enough
    > to do this. You would have to enlarge the draw region to encompass the
    > whole caret and redraw it entirely (from scratch). save/restore
    > doesn't depend on the underlying redraw state of the window, so it
    > seems a lot more robust to me.
    >

    OK, after reading this a few times, I think I understood :). However,
    one way or another the appearance of the caret needs to be
    sensitive to what it is being drawn over, and xor seems to be the only
    simple way to do this. Perhaps what we need is to separate the first
    draw from the subsequent re-draws; the first draw done using xor
    and imediately saving what we have drawn, the subequent draws
    using the save/restore mechanism we now use for clearing.

    The save/restore can now handle an unlimited number of separate
    rectangles, so in that regard that would be a trivial change. The real
    problem is how do we distinguish the primary draw from the
    redraws. Coordinances are not enough, for example in right-aligned
    text the caret remains static while the text beneath it moves. We
    would need some dirtiness mechanism through which the caret
    would be notified of any real draws in the window.

    Tomas



    This archive was generated by hypermail 2.1.4 : Fri Jan 24 2003 - 05:12:30 EST