Re: [Goocanvas-devel] custom item, python issues
- From: "Gian Mario Tagliaretti" <gianmt gnome org>
- To: "Brandon Lewis" <brandon_lewis berkeley edu>
- Cc: goocanvas-list gnome org, goocanvas-devel <goocanvas-devel lists sourceforge net>
- Subject: Re: [Goocanvas-devel] custom item, python issues
- Date: Mon, 8 Dec 2008 20:52:13 +0100
On Mon, Dec 8, 2008 at 6:59 PM, Brandon Lewis
<brandon_lewis berkeley edu> wrote:
Hi Brandon,
I've cc'd goocanvas-list on gnome since we are using that one now.
> I am trying to write a custom python canvas item derived from
> GoocanvasItemSimple. It overrides the following methods
>
> * do_simple_update
> * do_simple_paint
> * do_simple_is_item_at
>
> The item displays initially, but if changed(True) is called for any reason, the
> item disappears. I am not sure what the true cause is, but in my debugging
> efforts I have learned that the item's bounds are all wrong. The boundary
> coordinates always increase before every update, no matter what values I
> assigned to them in a previous update. I have even tried setting the bounds to
> all zeros, just to see what effect this might have.
>
> What I really would like to see is a python example of an item derived from
> ItemSimple that also overrides do_simple_{update,paint,is_item_at} so that I can
> see if I'm doing something wrong. I have looked at the C code for the Rect item,
> and I can't see anything obvious that I am doing wrong.
there is a custom-svg.py example that uses update, paint and
is_item_at, isn't that one useful?
http://svn.gnome.org/viewvc/pygoocanvas/trunk/demo/customs/custom-svg.py?view=markup
cheers
--
Gian Mario Tagliaretti
GNOME Foundation member
gianmt gnome org
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]