Single pass text and background

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I'm wondering whether there is a single pass method to draw text with a background using Xft? Just flat color, nothing special.

Something like XftDrawStringUtf8 with an extra couple of parameters for a rectangle and color.

This would make it much easier to write flicker free code. Currently I have to fill the area behind the text using a rectangle primitive and then overlay the text, and of course this doesn't happen instantly so between the 2 operations you get background color only on the screen... and thus flicker. Yes I know double buffering fixes this, but the speed + memory hit is a bit much for simple things like standard GUI widgets (tree/list/button etc).

This is one reason windows _looks_ a lot smoother than most X applications, because they can do this. I don't see why it can't be done (maybe I'm missing something in the API?) because it's fairly simple at a technical level.

regards
--
Matthew Allen
(fret@xxxxxxxxxxxx) (http://www.memecode.com)



[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux