Re: GtkSheet background style

From: Date: Tue, 11 Jan 2005 19:41:23 +0000
Subject: Re: GtkSheet background style
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5432@lists.php.net to get a copy of this message
> gint row0, col0, rowi, coli; > GtkSheetRange *range; > zval *php_color; > GdkColor *color; > > NOT_STATIC_METHOD(); > > range->row0 = (gint)row0; > range->col0 = (gint)col0; > range->rowi = (gint)rowi; > range->coli = (gint)coli; > > color = PHP_GDK_COLOR_GET(php_color); > gtk_sheet_range_set_background(GTK_SHEET(PHP_GTK_GET(this_ptr)), > (GtkSheetRange *) range, color); > The code works fine, but I have one problem, the color is not the > orignal color, for example: > > $bgcolor = &new GdkColor("yellow"); > $sheet->range_set_background(0, 0, 0, 2, $bgcolor); > > This code colorize the first 3 colums of the first row, but the > background color is not yellow, the color change when I start the > script, and puts green, red or other colors, why this? WILD GUESS!!! gint is "too big" for the color values, which are only one byte for each of R, G, and B. I've got NO IDEA what a 'gint' is, mind you... But it does seem like you've got your bytes/words/longs mixed up if you are getting the wrong colors . -- Like Music? http://l-i-e.com/artists.htm

« previous php.gtk.general (#5432) next »