Re: GtkSheet background style

From: Date: Tue, 11 Jan 2005 20:08:37 +0000
Subject: Re: GtkSheet background style
References: 1 2  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-5433@lists.php.net to get a copy of this message
gint is not for the color, the gint values are for the GtkSheetRange struct, in the original file gtksheet.h the struct declares this type of value and I put the same type for the range values. The color is a object, GdkColor... I implented the range_set_background, range_set_foreground, range_set_border and range_set_border_color ... you can view here: http://www.alaplaya.com/gtksheet.jpg Regards El mar, 11-01-2005 a las 20:41, Richard Lynch escribió: > > 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 . -- Ivan Rodriguez <epplestun@gmail.com>

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