Gnome Canvas




I was playing with the Gnome Canvas recently and I noticed a few things
that were missing or didn't quite work the way I excpected them to.  So as
a result, I have a few questions:

1)  Is there any reason why the scale of the canvas doesn't use an
adjustment(or at least doesn't seem too?)

2)  When placing the canvas in a scrolled window things don't behave as
expected.  For example, when zooming the canvas doesn't update the
adjustment so the scrolled window modifies its scroll bars.  I think that
this may be my fault however.  I am letting the scrolled window generate
the adjustments and then just placing the canvas into the scrolled window,
is there a way to extract Adjustments from the canvas to feed to the
scrolled window?

3) There doesn't seem to be a way to make canvas groups "opaque".  By
opaque, I mean opaque to item queries.  In other words if someone asks,
which item is at x,y and there is an item there but it is in an opaque
group, only the group is returned as the item.  This is useful so that a
caller that wants to treat a group as a single object can easily do so,
instead of traversing the group heirarchy to find the macro object.  If
this is possible, how do you do it?  It doesn't look like groups support
this but it appears to be a trivial modification to do it.

4) If I wish to not propogate events through a group to items within the
group, is it possible to simply attach to the groups "event" signal and
return TRUE from the handler?  Is there a better way to do this?

5) I noticed in the canvas TODO list that there is no method to get all
the items in a single area.  Is there any code hidden away to perform
this?  What selection modes are being planned? 
  
  I see multiple ways to perform this selection.  In both cases you send a
set of vertices to the canvas and ask, which items are in this polygon.  
This is the same as the clipping problem.  It appears that the canvas will
support arbitrary clip paths, is this true?  If so, all we need to do is
find out which objects intersect the clip path.  Objects inside the path
are clearly in the selection region, objects outside the clip path are
outside the selection region.  Now, objects on the clip path can be
considered inside the region or outside the region depending on a flag.
Opaque groups would also fit well within this model.


Manish Vachharajani               Some Haiku: A crash reduces
<mvachhar@vger.rutgers.edu>                   your expensive computer
                                              to a simple stone - Unknown



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