20class DSvgRenderer :
public QObject,
public DTK_CORE_NAMESPACE::DObject
22 Q_PROPERTY(QRectF viewBox READ viewBoxF WRITE setViewBox)
25 DSvgRenderer(
const QString &filename, QObject *parent = Q_NULLPTR);
26 DSvgRenderer(
const QByteArray &contents, QObject *parent = Q_NULLPTR);
31 QSize defaultSize()
const;
33 QRect viewBox()
const;
34 QRectF viewBoxF()
const;
35 void setViewBox(
const QRect &viewbox);
36 void setViewBox(
const QRectF &viewbox);
38 QRectF boundsOnElement(
const QString &
id)
const;
39 bool elementExists(
const QString &
id)
const;
41 QImage toImage(
const QSize sz,
const QString &elementId = QString())
const;
44 bool load(
const QString &filename);
45 bool load(
const QByteArray &contents);
46 void render(QPainter *p);
47 void render(QPainter *p,
const QRectF &bounds);
49 void render(QPainter *p,
const QString &elementId,
50 const QRectF &bounds = QRectF());