PythonQt.QtSvg.QSvgRenderer · declarations 001
Back to PythonQt.QtSvg.QSvgRenderer
animated
animated() -> bool
X.animated() -> bool
Supplemental documentation: Qt 5 reference:
bool QSvgRenderer::animated() const
Returns true if the current document contains animated elements; otherwise returns false.
See also framesPerSecond().
Upstream PySide2 reference signatures (binding differences may apply):
animated(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#animated
animationDuration
animationDuration() -> int
X.animationDuration() -> int
Upstream PySide2 reference signatures (binding differences may apply):
animationDuration(self) -> int
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#animationDuration
aspectRatioMode
instance-attribute
aspectRatioMode: Any
Qt 5 reference:
aspectRatioMode : Qt::AspectRatioMode
how rendering adheres to the SVG view box aspect ratio
The accepted modes are:
- Qt::IgnoreAspectRatio (the default): the aspect ratio is ignored and the rendering is stretched to the target bounds.
- Qt::KeepAspectRatio: rendering is centered and scaled as large as possible within the target bounds while preserving aspect ratio.
This property was introduced in Qt 5.15.
Access functions:
| Qt::AspectRatioMode | aspectRatioMode() const |
|---|---|
| void | setAspectRatioMode(Qt::AspectRatioMode mode) |
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#aspectRatioMode
boundsOnElement
boundsOnElement(id: str) -> Any
X.boundsOnElement(id) -> PythonQt.QtCore.QRectF
Supplemental documentation: Qt 5 reference:
QRectF QSvgRenderer::boundsOnElement(const QString \&id) const
Returns bounding rectangle of the item with the given id. The transformation matrix of parent elements is not affecting the bounds of the element.
This function was introduced in Qt 4.2.
See also transformForElement().
Upstream PySide2 reference signatures (binding differences may apply):
boundsOnElement(self, id: str) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#boundsOnElement
currentFrame
instance-attribute
currentFrame: int
defaultSize
defaultSize() -> Any
X.defaultSize() -> PythonQt.QtCore.QSize
Supplemental documentation: Qt 5 reference:
QSize QSvgRenderer::defaultSize() const
Returns the default size of the document contents.
Upstream PySide2 reference signatures (binding differences may apply):
defaultSize(self) -> PySide2.QtCore.QSize
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#defaultSize
destroyed
destroyed(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtSvg.QSvgRenderer.destroyed; argument details are not documented.
elementExists
elementExists(id: str) -> bool
X.elementExists(id) -> bool
Supplemental documentation: Qt 5 reference:
bool QSvgRenderer::elementExists(const QString \&id) const
Returns true if the element with the given id exists in the currently parsed SVG file and is a renderable element.
Note: this method returns true only for elements that can be rendered. Which implies that elements that are considered part of the fill/stroke style properties, e.g. radialGradients even tough marked with "id" attributes will not be found by this method.
This function was introduced in Qt 4.2.
Upstream PySide2 reference signatures (binding differences may apply):
elementExists(self, id: str) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#elementExists
framesPerSecond
instance-attribute
framesPerSecond: int
Qt 5 reference:
framesPerSecond : int
This property holds the number of frames per second to be shown
The number of frames per second is 0 if the current document is not animated.
Access functions:
| int | framesPerSecond() const |
|---|---|
| void | setFramesPerSecond(int num) |
See also animated().
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#framesPerSecond
isValid
isValid() -> bool
X.isValid() -> bool
Supplemental documentation: Qt 5 reference:
bool QSvgRenderer::isValid() const
Returns true if there is a valid current document; otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
isValid(self) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#isValid
load
load(filename: Any) -> bool
X.load(filename) -> bool
Supplemental documentation: Qt 5 reference:
[slot] bool QSvgRenderer::load(QXmlStreamReader *contents)
Loads the specified SVG in contents, returning true if the content was successfully parsed; otherwise returns false.
The reader will be used from where it currently is positioned. If contents is null,
behavior is undefined.
This function was introduced in Qt 4.5.
[slot] bool QSvgRenderer::load(const QByteArray \&contents)
Loads the specified SVG format contents, returning true if the content was successfully parsed; otherwise returns false.
[slot] bool QSvgRenderer::load(const QString \&filename)
Loads the SVG file specified by filename, returning true if the content was successfully parsed; otherwise returns false.
Upstream PySide2 reference signatures (binding differences may apply):
load(self, contents: PySide2.QtCore.QByteArray) -> bool
load(self, contents: PySide2.QtCore.QXmlStreamReader) -> bool
load(self, filename: str) -> bool
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#load
matrixForElement
matrixForElement(id: str) -> Any
X.matrixForElement(id) -> PythonQt.QtGui.QMatrix
Upstream PySide2 reference signatures (binding differences may apply):
matrixForElement(self, id: str) -> PySide2.QtGui.QMatrix
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#matrixForElement
objectNameChanged
objectNameChanged(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtSvg.QSvgRenderer.objectNameChanged; argument details are not documented.
render
render(p: Any, elementId: Any, bounds: Any) -> None
X.render(p, elementId, bounds)
Supplemental documentation: Qt 5 reference:
[slot] void QSvgRenderer::render(QPainter *painter, const QString \&elementId, const QRectF \&bounds \= QRectF())
Renders the given element with elementId using the given painter on the specified bounds. If the bounding rectangle is not specified the SVG element is mapped to the whole paint device.
[slot] void QSvgRenderer::render(QPainter *painter, const QRectF \&bounds)
Renders the current document, or the current frame of an animated document, using the given painter on the specified bounds within the painter. If bounds is not empty, the output will be scaled to fill it, ignoring any aspect ratio implied by the SVG.
[slot] void QSvgRenderer::render(QPainter *painter)
Renders the current document, or the current frame of an animated document, using the given painter.
Upstream PySide2 reference signatures (binding differences may apply):
render(self, p: PySide2.QtGui.QPainter) -> None
render(self, p: PySide2.QtGui.QPainter, bounds: PySide2.QtCore.QRectF) -> None
render(self, p: PySide2.QtGui.QPainter, elementId: str, bounds: PySide2.QtCore.QRectF=...) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#render
repaintNeeded
repaintNeeded(*args: Any, **kwargs: Any) -> Any
Native PythonQt.QtSvg.QSvgRenderer.repaintNeeded; argument details are not documented.
Supplemental documentation: Qt 5 reference:
[signal] void QSvgRenderer::repaintNeeded()
This signal is emitted whenever the rendering of the document needs to be updated, usually for the purposes of animation.
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#repaintNeeded
setCurrentFrame
setCurrentFrame(arg__1: int) -> None
X.setCurrentFrame(arg__1)
Upstream PySide2 reference signatures (binding differences may apply):
setCurrentFrame(self, arg__1: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#setCurrentFrame
setFramesPerSecond
setFramesPerSecond(num: int) -> None
X.setFramesPerSecond(num)
Upstream PySide2 reference signatures (binding differences may apply):
setFramesPerSecond(self, num: int) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#setFramesPerSecond
setViewBox
setViewBox(viewbox: Any) -> None
X.setViewBox(viewbox)
Upstream PySide2 reference signatures (binding differences may apply):
setViewBox(self, viewbox: PySide2.QtCore.QRect) -> None
setViewBox(self, viewbox: PySide2.QtCore.QRectF) -> None
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#setViewBox
viewBox
instance-attribute
viewBox: QRectF
Qt 5 reference:
viewBox : QRectF
This property holds the rectangle specifying the visible area of the document in logical coordinates
This property was introduced in Qt 4.2.
Access functions:
| QRectF | viewBoxF() const |
|---|---|
| void | setViewBox(const QRect \&viewbox) |
| void | setViewBox(const QRectF \&viewbox) |
QRect QSvgRenderer::viewBox() const
Returns viewBoxF().toRect().
See also setViewBox() and viewBoxF().
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#viewBox
viewBoxF
viewBoxF() -> Any
X.viewBoxF() -> PythonQt.QtCore.QRectF
Upstream PySide2 reference signatures (binding differences may apply):
viewBoxF(self) -> PySide2.QtCore.QRectF
Source: https://doc.qt.io/archives/qt-5.15/qsvgrenderer.html#viewBoxF