On 10/20/06, konrad kwaskiewicz <[EMAIL PROTECTED]> wrote: > hi > I need to get Color from selected point (x,y) on drawing area > (not using ColorButton, just knowing [x,y]) > is there some function like drawingarea.getColor(int x,int y) > or any other possibility to take color from one point? > it would be grate if someone knows an example > thanks >
I've not personally done this, but the GTK+ colorselector widget has a little "dropper" button that lets you click anywhere on the screen to get the color at the point where you click. So you might look at the GTK+ source for inspiration and then convert that to gtkmm. It doesn't look like they use any internal API so it should be pretty easy. Look for the function "grab_color_at_mouse()" in the following file: http://cvs.gnome.org/viewcvs/gtk%2B/gtk/gtkcolorsel.c?rev=1.150&view=markup Hope that helps. -- jonner _______________________________________________ gtkmm-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/gtkmm-list
