Re: drawing a pixel of any color in a Drawing area
- From: Gustavo Joćo Alves Marques Carneiro <ee96090 fe up pt>
- To: Andrew Price <andrew price eng monash edu au>
- Cc: gnome-devel-list gnome org
- Subject: Re: drawing a pixel of any color in a Drawing area
- Date: Wed, 12 Jul 2000 16:18:38 +0100 (WET)
You have to create a GdkColor (a C struct) fill the red, green and blue
fields with values, and alocate the color the window's (GdkWindow) color
map (see gtk_widget_get_colormap). After you allocated the color, change
your GC to that color and draw. But you should create a new GC first. See
the GTK tutorial for more information.
On Mon, 10 Jul 2000, Andrew Price wrote:
> I want to be able to draw a pixel of a user defined color in a drawing
> area
>
> Typically I am using gdk_draw_point
> however the only styles I am aware of are black_gc and white_gc.
>
> How can I make gdk_draw_point draw a pixel of any color in a 16bit color
> space?
>
> (NOT 24 bit color space)
> Andrew
>
--
Gustavo J.A.M. Carneiro
[linuxdeec.fe.up.pt/~ee96090]
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]