Re: clearing a gdk_image through memset



You are much better off using a GdkPixbuf for client-side image data,
since it has a fixed format. GdkImage is just the raw format of the
display hardware.

What about Gdk_Rgb.

Best Regards,
Norman Black
Stony Brook Software

----- Original Message -----
From: "Havoc Pennington" <hp redhat com>
To: "MC_Vai" <estoy ver megared net mx>
Cc: <gtk-app-devel-list gnome org>
Sent: Friday, July 13, 2001 12:08 PM
Subject: Re: clearing a gdk_image through memset



MC_Vai <estoy ver megared net mx> writes:
En un Fri Jul/13/2001, a las 13:10:53, Havoc Pennington escribió:

memset( (void *)oszi_image->mem,
(int)black_color.pixel,
sizeof(oszi_image->mem) * (oszi_height * oszi_width) );

This assumes that a pixel is 1 byte, and that sizeof(oszi_image->mem)
is 1, neither of which is true in general.

So, what would be the right way to do it?


Read the Xlib Programming Manual (vol. 1 X book from O'Reilly). It
explains the format of an XImage. It's complicated and you don't want
to understand it though, I'll warn you in advance.

You are much better off using a GdkPixbuf for client-side image data,
since it has a fixed format. GdkImage is just the raw format of the
display hardware.

Havoc

_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list





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