NULL bitmasks - ideas?
| From: | Alan Knowles | Date: | Wed, 05 Dec 2001 08:36:19 +0000 |
| Subject: | NULL bitmasks - ideas? | ||
| References: | 1 2 3 | Groups: | php.gtk.dev |
| Request: | Send a blank email to php-gtk-dev+get-230@lists.php.net to get a copy of this message | ||
list($pixmap, $mask) = $pixbuf->render_pixmap_and_mask($anynumber);
always seems to return NULL as $mask,
In the code I've got, I'm using the pixmap to show a mini image of a png,
using $clist->set_pixmap(0,$line,$pixmap,$mask);
now since $mask is NULL, set_pixmap will not render the image as
if (!php_gtk_parse_args(ZEND_NUM_ARGS(), "iiOO", &row, &column, &pixmap, gdk_pixmap_ce, &mask, gdk_bitmap_ce))
return;will always work out that mask is NULL and return. before doing the call. - if I send a dummy $mask, and force a NULL value below, it works OK. /* gtk_clist_set_pixmap(GTK_CLIST(PHP_GTK_GET(this_ptr)), (gint)row, (gint)column, PHP_GDK_PIXMAP_GET(pixmap), PHP_GDK_BITMAP_GET(mask)); */
gtk_clist_set_pixmap(GTK_CLIST(PHP_GTK_GET(this_ptr)), (gint)row, (gint)column, PHP_GDK_PIXMAP_GET(pixmap), NULL); now, from what I gather - it is perfectly acceptable to send NULL as the mask to gtk_clist_set_pixmap - Should this function be moved to gtk.overrides? - and changed to something likeZEND_NUM_ARGS(), "iiO(O)", &row, &column, ........ or can you think of a better way to do it? regards alan