get_bounds does not behave as documented
Bug #124921 reported by
Ethan Glasser-Camp
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
pygoocanvas |
Fix Committed
|
Undecided
|
Unassigned |
Bug Description
The docs say:
goocanvas.
def get_bounds()
Returns: A tuple containing the four coordinates.
But my version of goocanvas.defs says:
(define-method get_bounds
(of-object "GooCanvasItem")
(c-name "goo_canvas_
(return-type "none")
(parameters
'("
)
)
So instead of doing this:
x1, y1, x2, y2 = item.get_bounds()
You have to do this:
b = goocanvas.Bounds()
item.get_bounds(b)
x1, y1, x2, y2 = b.x1, b.y1, b.x2, b.y2
I feel that this is less Pythonic, but if you actually meant for this to happen, then you should update the docs.
Ethan
To post a comment you must log in.
I see this is fixed in SVN. Sorry to waste your time!
Ethan