Suggestions on using gdkcolor...

From: Date: Tue, 28 Aug 2001 06:39:36 +0000
Subject: Suggestions on using gdkcolor...
Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-24@lists.php.net to get a copy of this message
this is a the draw_brush function from scrible.php in the test dir. what it should ! :) do is create a set of 100 dots of different colours .. what it does is creates all 'cyan' dots.. ideas would be appreciated before I bang my head against a brick wall too long :) regards alan function draw_brush($widget, $x, $y) { global $pixmap; $win = $widget->window; for ($r=0;$r< 10;$r++) { for ($b=0;$b<10;$b++) { $col = &new gdkColor($r*6552,$b*6552,100); $col->red = $r*6552; $col->blue=$b*6552; $col->green= $b*6552 ; echo "COL? $col->red $col->blue $col->green \n"; $gc=$win->new_gc(); //echo serialize($gc); $gc->foreground=$col; $gc->background=$col; $gc->line_width=10; $gc->function= GDK_COPY; // GDK_COPY, GDK_XOR and GDK_INVERT gdk::draw_arc($win, $gc, true, $r*10, $b*10 , 8, 8, 0, 64 * 360); }} gdk::draw_arc($pixmap, $widget->style->black_gc, true, $x - 4, $y - 4, 8, 8, 0, 64 * 360); $widget->draw($x - 4, $y - 4, 8, 8); }

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