Re: Suggestions on using gdkcolor...
| From: | Andrei Zmievski | Date: | Tue, 28 Aug 2001 13:23:38 +0000 |
| Subject: | Re: Suggestions on using gdkcolor... | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-28@lists.php.net to get a copy of this message | ||
On Tue, 28 Aug 2001, Alan Knowles wrote:
> 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 :)
Here's a basic procedure for setting up color in a GC:
$window = $widget->window;
$gc = $window->new_gc();
$cmap = $widget->get_colormap();
$gc->foreground = $cmap->alloc(34000, 23000, 55000);
You can't simply use "new GdkColor()" here due to some weirdnewss of X
Windows system..
-Andrei
"You choose to do the bad things in your life;
the good ones come and drag you along with them."
- Michael Marshall Smith