Re: Drawing area feature?
- From: CALMELS Clement <calmels_clement stna dgac fr>
- To: Carlos Pereira <carlos pehoe civil ist utl pt>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Drawing area feature?
- Date: Thu, 19 Apr 2001 15:10:33 +0200
Thanks for your explanation but I will appreciate more details.
Use a double buffer and draw your objects in the back buffer,
(exactly as in a normal draw), each object with a different color.
Then you just have to compare the color of the pixel where the
user clicked with the color of the objects, to see which one
was selected.
I know the gdk_image_get_pixel function but it applies on a GdkImage. I
can build the GdkImage with something like that:
gdk_image_get( widget->window,
event->button.x,
event->button.y, 1, 1);
Where widget is the drawing area. But I don't find a way to retrieve the
pixel color on a GdkPixmap (the back buffer). A clue?
Clement.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]