On Fri, Jan 25, 2008 at 05:36:43PM +0800, LIU Chun Hung wrote: > I don't know the difference between these types(GtkImage, GdkImage, > GdkPixmap and GdkBitmap) although I have read the GTK and GDK API > Reference Manual.
Disclaimer: IANAEGD (I Am Not An Experienced Gtk+ Developer).
GtkImage is a widget that you can stick into a window to display image
data (stored in a GdkImage).
GtkPixmap is a widget that you can stick into a window to display image
data (stored in a GdkPixmap).
The difference between an image and a pixmap is that the image is stored
on the client and transfers pixel data to the X server on every redraw
request, while a pixmap is stored on the X server. Usually this is more
efficient, but if you plan to modify the image, you cannot use pixmaps.
A GdkBitmap is a *bit* map: it's a 1-bit per pixel image, usually used
for things like transparency maps.
> Suppose I want to create a new RGB bitmap with 3 x 3 in size and I want to
> set all pixel values to be 0. After clicking a button, all pixel values
> will change to 255. Which one of the above types should I use? Should
> GdkImage be used as I can see there are functions to change the pixel
> values (gdk_image_put_pixel) in this type, but not in other types.
You would use a GdkImage to manipulate the pixels, and a GtkImage to
display it.
Marius Gedminas
--
"All programs evolve until they can send email."
-- Richard Letts
"Except Microsoft Exchange."
-- Art
(found on the Snort web site)
signature.asc
Description: Digital signature
_______________________________________________ maemo-developers mailing list [email protected] https://lists.maemo.org/mailman/listinfo/maemo-developers
