selection drawing

From: Tomas Frydrych (tomasfrydrych@yahoo.co.uk)
Date: Sat Jun 28 2003 - 06:30:39 EDT

  • Next message: Tomas Frydrych: "commit (HEAD): ut_contextGlyph.h/cpp"

    We currently draw the selection rectangles using fillRect() function,
    and this is not optimal. It would be better if we had a xorRect()
    function and use it instead. The main benefit would be that the text
    of the whole run could be drawn in a single go in a single colour.
    While the performance gain is probably negligeable, it would mean no
    need to decompose ligatures on selection boundaries. (The screen
    redraw always starts with filling the base rectangle with background
    colour, so this would not mean the dirt problems we experienced with
    the carret.)

    The other thing is the selection colour. At present it is preference-
    given, which is only marginally better than having it hard coded. It
    would seem to me that a very simple way of having the selection
    colour sufficiently contrast with the background is to use the
    current font colour to draw the rectangles and to used the current
    bacground colour to draw the text in them. This requires virtually no
    changes to our code, with the additional benefit of being able to get
    rid of the selection colour preferences.

    Tomas



    This archive was generated by hypermail 2.1.4 : Sat Jun 28 2003 - 06:45:08 EDT