Re: Suggestions on using gdkcolor...

From: Date: Tue, 28 Aug 2001 07:03:12 +0000
Subject: Re: Suggestions on using gdkcolor...
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-25@lists.php.net to get a copy of this message
Those colours range from 0 to 256(*255) Does that help any? ----- Original Message ----- From: "Alan Knowles" <alan_k@hklc.com> To: <php-gtk-general@lists.php.net> Sent: Tuesday, August 28, 2001 7:39 AM Subject: [PHP-GTK] Suggestions on using gdkcolor... 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); } -- PHP-GTK General Mailing List (http://gtk.php.net/) To unsubscribe, e-mail: php-gtk-general-unsubscribe@lists.php.net For additional commands, e-mail: php-gtk-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

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