[pygtk] gnome canvas get_bounds() broken?
Andrew Reid
Andrew.Reid at nist.gov
Fri Jan 20 22:56:39 WST 2006
On Fri, Jan 20, 2006 at 12:13:30PM +1300, Rob Brown-Bayliss wrote:
> HI,
>
> Does any one know ifthe gnome canvs items get_bounds() function is working?
>
> When I call it from any object on my canvas I get: (0.0, 0.0, 0.0,
> 0.0) which suggests that it is broken.
We have a project that makes extensive use of the canvas, and
have had some difficulties with the get_bounds function. It seems
to compute the bounds incorrectly for outline polygons, or possibly
only for the first outline polygon drawn to it.
It may be related to the fact that, in our case, the relation
between canvas space and "user space" includes an inversion operation,
so that polygons which are right-handed in user space are left-handed
in canvas space, and vice versa. The only reason we think this is
because it's the only thing we can think of that makes polygons
different from other sorts of primitives.
We haven't investigated this in detail, since the bounds seem
to start working after a while.
-- A.
--
Dr. Andrew C. E. Reid, Guest Researcher
Center for Theoretical and Computational Materials Science
National Institute of Standards and Technology, Mail Stop 8500
Gaithersburg MD 20899 USA
andrew.reid at nist.gov
More information about the pygtk
mailing list