On 6/28/05, Andreas Bentlage <[EMAIL PROTECTED]> wrote:
> i have the following 2 arrays.
> gfloat pixel[6000][1] = x[n]
> gfloat pixel[6000][2] = y[n]
> this 2 arrays contains the x/y values for 6000 rectangles
> drawn on a pixmap. Now my problem ...
> with button_press_event i catch the current x/y positions
> from screen. What i want is to draw the given pixels from
> my arrays in a different color when i'm close to it with my mouse.

In the button_press handler, save the mouse x/y position somewhere and
then trigger an expose. In the expose handler, redraw all your points
calculating the colour from the distance between the point and the
saved click position.

If it's too slow, you can start to do your own clipping depending on
the distance function.

John
_______________________________________________
gtk-list mailing list
gtk-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-list

Reply via email to