canvas.render doesn't accept None as second parameter
- From: John Coppens <john jcoppens com>
- To: goocanvas-list gnome org
- Subject: canvas.render doesn't accept None as second parameter
- Date: Sun, 27 Mar 2016 16:27:22 -0300
Hi all,
From a demo I found on the 'net, I used:
surface = cairo.SVGSurface("demo.svg", 9 * 72, 10 * 72)
cr = cairo.Context(surface)
self.canvas.render(cr, None, 1)
This prints:
Traceback (most recent call last):
File "necview.py", line 351, in save_SVG
self.canvas.render(cr, None, 1)
File "/usr/lib64/python2.7/site-packages/gi/types.py", line 44, in function
return info.invoke(*args)
TypeError: argument 2: Must be GooCanvas.CanvasBounds, not NoneType
According to https://lazka.github.io/pgi-docs/GooCanvas-2.0/classes/Canvas.html#GooCanvas.Canvas.render
render should accept None as second parameter.
1) Is this a doc error or a GI/Goocanvas regression?
2) I couldn't find a working demo which uses 'render' and SVG|PNG...surfaces in python.
BTW, I have GooCanvas 2.0.2 installed, on Linux.
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]