Re: Again: string in gdkrgb
- From: volodya mindspring com
- To: Rob Alblas <r alblas demon nl>
- Cc: gtk-app-devel-list redhat com
- Subject: Re: Again: string in gdkrgb
- Date: Tue, 7 Nov 2000 16:54:22 -0500 (EST)
On Tue, 7 Nov 2000, Rob Alblas wrote:
My program draws a picture using GdkRGB and associated gdk_draw_rgb_image. So,
I do not use a pixmap and associated gdk_draw_pixmap (because it is slower).
This depends.. (my experience is mostly with X11 pixmaps, which, I presume,
gdk pixmap encapsulates)..
If what you do is construct some image on-the-fly by painting with
standard operations _and_ you do not need to access the pixels directly
then pixmap maybe faster. You see, pixmaps live in the Xserver, which can
do a lot of nice things with them - like using graphic accelerator for
drawing. I wrote a program once that was drawing a simple user interface
using pixmaps for double buffering. It worked fine over a modem
connection. (I.e. pixmap and display were on NCD terminal and my home
machine, on which the program was run, was connected to the network via
If you are using a local xserver pixmaps and shm images are almost the
same in perfomance, though, of course, shm images cannot be cached in
On the other hand if you want to do image processing you might want to
consider using some kind of library for rasterization (for example
freetype). This would be more portable, you'll have more control over what
is being drawn and you'll be able to do antialiased characters.
hope this is useful..
How can I add text into this picture?
gdk_draw_string needs a pixmap (which I don't use), or it can draw strings
directly into the drawable, in that case there is no double-buffering. So,
this function is not really usable, I think.
Is there a way to add the strings into the rgb_buf, in which case
gdk_draw_rgb_image does do all the display work?
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
] [Thread Prev