Warning
This documentation is for an old version of IPython. You can find docs for newer versions here.
Module: qt.svg
¶
Defines utility functions for working with SVG documents in Qt.
3 Functions¶
-
IPython.qt.svg.
save_svg
(string, parent=None)¶ Prompts the user to save an SVG document to disk.
Parameters: string : basestring
A Python string containing a SVG document.
parent : QWidget, optional
The parent to use for the file dialog.
Returns: The name of the file to which the document was saved, or None if the save
was cancelled.
-
IPython.qt.svg.
svg_to_clipboard
(string)¶ Copy a SVG document to the clipboard.
Parameters: string : basestring
A Python string containing a SVG document.
-
IPython.qt.svg.
svg_to_image
(string, size=None)¶ Convert a SVG document to a QImage.
Parameters: string : basestring
A Python string containing a SVG document.
size : QSize, optional
The size of the image that is produced. If not specified, the SVG document’s default size is used.
Returns: A QImage of format QImage.Format_ARGB32.
Raises: ValueError
If an invalid SVG string is provided.