Hi,

Whats the python equivalent of the following C code?

#define gray50_width 4
#define gray50_height 4
static char gray50_bits[] = {
 0x01, 0x02, 0x04, 0x08 };
stipple = gdk_bitmap_create_from_data (NULL, gray50_bits, gray50_width,
gray50_height);


I created this stipple pattern this way in python:
stipple = gtk.gdk.bitmap_create_from_data(None, '0x01, 0x02, 0x04, 0x08', 4,
4)

But when I use this stipple pattern the result is totally different from
that of what I see in the C implementation.

stipple = gtk.gdk.bitmap_create_from_data(None, '0x12, 0x48', 4, 4) comes
closer to the C implementation.

Am I missing something ???
-
Suresh
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to