Hello, I'm working on a swapping system symulator (in gtk+2.0). I was using widget->style to plot any symbols till now.
Now I need to show a value in a range. I can declare a GdkGC *table[256], but which colors will be suitable with every style? I could solve it in two ways: 1. Use ONLY custom colors (for symbols and gradient) and forget GtkStyle 2. Use style->white and style->black to generate a table: for (i=0; i<256; i++) { table[i].red = style->white.red * i / 256 + style->black.red * (256-i) / 256; table[i].green = style->white.green * i / 256 + style->black.green * (256-i) / 256; table[i].blue = style->white.blue * i / 256 + style->black.blue * (256-i) / 256; } What should I do to have nice looking gradient in every style? bajcik -- .----- Krzysztof Garus ----- http://kolos.math.uni.lodz.pl/~bajcik/ --. | Projekcik: http://kolos.math.uni.lodz.pl/~bajcik/duskc.html | _______________________________________________ gtk-list mailing list [EMAIL PROTECTED] http://mail.gnome.org/mailman/listinfo/gtk-list