SVGRenderer#
Qualified name: manimpango.SVGRenderer
- class SVGRenderer#
SVGRenderer
is a renderer which renders theLayout
to an SVG file.The
file_name
is opened when the class is initialised and only closed when the renderer is destroyed.- Parameters
Example
>>> import manimpango as mp >>> a = mp.SVGRenderer('test.svg', 100, 100, mp.Layout('hello')) >>> a <SVGRenderer file_name='test.svg' width=100.0 height=100.0 layout=<Layout text='hello' markup=None> >>> a.render() True
- Raises
Exception – Any error reported by cairo.
Methods
- file_name#
The file_name where the file is rendered onto
- height#
The height of the SVG.
- render()#
render()
actually does the rendering. Any error reported by Cairo is reported as an exception. If this method suceeds you can expect an valid SVG file atfile_name
.- Returns
True
if the function worked, elseFalse
.- Return type
- width#
The width of the SVG.