XftDrawString8() in X11 programming
hi
how can i delete text (draw text in display with XftDrawString8()) and draw another text in loop in display?
Any idea?
If I understand your question correctly, you want to erase some text you've written to a window and write some other text? In that case you'll want to fill that area with the window's background colour, then write your new text.
People with a Windows background tend to equate Xlib with Win32: it isn't even close. Xlib is a low-level drawing library that happens to understand 2 things: windows and events. Windows, in X lingo, are plain canvasses that can receive (and emit) events. They are not widgets/controls/components. In a sense, Xlib is a network-transparent, asynchronous library more akin to GDI. You definitely don't want to use it to write applications or user interfaces. Use a toolkit for that.
Also — and please do not take offense — are you sure you should be attempting X11 programming? It isn't trivial, and your posting history suggests you're barely getting started with GNU/Linux and GCC (and maybe even C). In fact, a lot of your questions are answered in the documentation already, leading me to believe that you aren't even attempting to learn it.
People with a Windows background tend to equate Xlib with Win32: it isn't even close. Xlib is a low-level drawing library that happens to understand 2 things: windows and events. Windows, in X lingo, are plain canvasses that can receive (and emit) events. They are not widgets/controls/components. In a sense, Xlib is a network-transparent, asynchronous library more akin to GDI. You definitely don't want to use it to write applications or user interfaces. Use a toolkit for that.
Also — and please do not take offense — are you sure you should be attempting X11 programming? It isn't trivial, and your posting history suggests you're barely getting started with GNU/Linux and GCC (and maybe even C). In fact, a lot of your questions are answered in the documentation already, leading me to believe that you aren't even attempting to learn it.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement