Re: events on a lot of triangles: [simplification of a previous post]




I will go definitely to your solution. So thanks!
If it is not too complicated I'll have a look to the cairo "goocanvas" too.

.....

The point here is that I do not have much time to maintain the code
and an hard coded solution is way easier to be maintained across the time.
(compared to some canvas widgets which might change along the time).

I would go to "goocanvas" if I had more time (per year) and an extra person
to maintain the code. The reason is as simple as it is this:
We need a good canvas. I do not personally have any preference
but one of the canvas solutions has to get better!

I.e. the problems given by Dov:

"..then you can use that knowledge to do a more efficient lookup."

and:
"..achieving that through a heavy preprocessing of the data that is cached on the server."


We have to rethink the canvas. At present is seems to be a list of objects
with device capabilities. The problem is not on the widget programmer side,
it is also on the user side. (the programmers! the users of the widget.).
Do we really want a couple of click-able boxes on the screen
or use some knowledge to achieve our target. (We might want
to reuse gnomecanvas for the simple stuff.)
We need to rethink the canvas!

I had a similar conversation with Dov in 2006:

http://mail.gnome.org/archives/gtk-list/2006-September/msg00275.html

At that time I was a beginner (still now) and I guess that Don was over
his rgb mapping. (Sorry Dov.. I got the idea but I was too young at that time.)
But the question at that time was about X-servers and X-clients.

So after 3 years I propose an equivalent question:
What happened to X client-server concept?
Where is GTK in this respect?

soon
Fabio




Which means:

On Sun, Feb 8, 2009 at 10:17 AM, Dov Grobgeld <dov grobgeld gmail com> wrote:
Here's another idea that I use in my program giv. Whenever I am painting an object on screen, I am painting the same object in an off-screen image with the same drawing commands but with "color" that is a combination of R,G,B that encode the index of the object. The important catch is that you have to turn off anti-aliasing for this to work. During motion events I then extract the corresponding pixel from the off-screen image, decode the R,G, and B to get the index of the object, which points to a vector of properties that I show.

Regards,
Dov





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