Re: drawing a pixel of any color in a Drawing area



On Wed, 12 Jul 2000, Gustavo Joćo Alves Marques Carneiro wrote:

>   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.

Or use gdk_rgb routines (look at gdk/gdkrgb.h) :)

Lauris

> 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
> > 
> 
> 





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]