Canvas

class rodlayout.Canvas(cell_view: Any = None)

A Canvas class, similar to the geometry.Canvas class.

Instead of creating a visual output of the shapes, this canvas creates shapes in virtuoso.

The layer is controlled by the user_data field of the shapes

>>> c = Canvas(...)
__init__(cell_view: Any = None) → None

Initialize self. See help(type(self)) for accurate signature.

append(shape: Union[geometry.rect.Rect, geometry.path.Segment, geometry.group.Group]) → None

Add one shape to the Canvas

>>> from geometry import Rect
>>> c = Canvas(...)
>>> len(c.shapes)
0
>>> c.append(Rect[2, 4, Layer('M1', 'drawing')])
>>> len(c.shapes)
1
draw(redraw: bool = False) → List[rodlayout.proxy.DbShape]

Draw all shapes in the Canvas, i.e. instantiate them in Virtuoso.

Pass True```to ``redraw to automatically redraw the shapes in Virtuoso. Without this, you must first change the view in Virtuoso to see the created shapes