Re: Colours...



Ian Molton <spyro armlinux org> writes: 
        backgroundgc = gdk_gc_new(pixmap);
        gdk_color_parse("004400", &colour);
        visual = gdk_visual_get_system();
        colourmap = gdk_colormap_new(visual, TRUE);
        gdk_colormap_alloc_color(colourmap, &colour, FALSE, TRUE);

You want simply:

 GdkColor color;
 gdk_color_parse ("#004400", &color);
 gdk_gc_set_rgb_fg_color (gc, &color);

Ignore all the visual/colormap goo.

Havoc



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