6#ifndef QT_NO_SVGRENDERER
14#include "private/qobject_p.h"
153 return d->render->size();
167 return d->render->viewBox().toRect();
181 d->render->setViewBox(viewbox);
194 return d->render->animated();
217 qWarning(
"QSvgRenderer::setFramesPerSecond: Cannot set negative value %d",
num);
242 if (
d->render &&
d->render->preserveAspectRatio())
252 d->render->setPreserveAspectRatio(
true);
254 d->render->setPreserveAspectRatio(
false);
272 return d->render->currentFrame();
281 d->render->setCurrentFrame(
frame);
295 return d->render->animationDuration();
307 emit q->repaintNeeded();
310template<
typename TInputType>
313 const TInputType &
in)
317 if (
d->render && !
d->render->size().isValid()) {
321 if (
d->render &&
d->render->animated() &&
d->fps > 0) {
328 d->timer->start(1000/
d->fps);
329 }
else if (
d->timer) {
403 d->render->draw(
painter, elementId, bounds);
425 return d->render->viewBox();
434 d->render->setViewBox(viewbox);
451 bounds =
d->render->boundsOnElement(
id);
474 exists =
d->render->elementExists(
id);
496 trans =
d->render->transformForElement(
id);
502#include "moc_qsvgrenderer.cpp"
The QPainter class performs low-level painting on widgets and other paint devices.
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
QSvgTinyDocument * render
static void callRepaintNeeded(QSvgRenderer *const q)
QTransform transformForElement(const QString &id) const
void render(QPainter *p)
Renders the current document, or the current frame of an animated document, using the given painter.
QRectF boundsOnElement(const QString &id) const
QSize defaultSize() const
Returns the default size of the document contents.
bool animated() const
Returns true if the current document contains animated elements; otherwise returns false.
~QSvgRenderer()
Destroys the renderer.
bool isValid() const
Returns true if there is a valid current document; otherwise returns false.
QSvgRenderer(QObject *parent=nullptr)
Constructs a new renderer with the given parent.
int currentFrame
the current frame of the document's animation, or 0 if the document is not animated
void setFramesPerSecond(int num)
int framesPerSecond
the number of frames per second to be shown
void setAspectRatioMode(Qt::AspectRatioMode mode)
Qt::AspectRatioMode aspectRatioMode
how rendering adheres to the SVG view box aspect ratio
void setViewBox(const QRect &viewbox)
bool load(const QString &filename)
Loads the SVG file specified by filename, returning true if the content was successfully parsed; othe...
int animationDuration() const
bool elementExists(const QString &id) const
void setCurrentFrame(int)
QRectF viewBox
the rectangle specifying the visible area of the document in logical coordinates
static QSvgTinyDocument * load(const QString &file)
Combined button and popup list for selecting options.
GLbitfield GLuint64 timeout
[4]
GLdouble GLdouble GLdouble GLdouble q
static bool loadDocument(QSvgRenderer *const q, QSvgRendererPrivate *const d, const TInputType &in)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent