150    QImage svgAsImage( 
const QString &path, 
double size, 
const QColor &fill, 
const QColor &stroke, 
double strokeWidth,
 
  151                       double widthScaleFactor, 
bool &fitsInCache, 
double fixedAspectRatio = 0, 
bool blocking = 
false,
 
  152                       const QMap<QString, QString> ¶meters = QMap<QString, QString>() );
 
  176    QPicture svgAsPicture( 
const QString &path, 
double size, 
const QColor &fill, 
const QColor &stroke, 
double strokeWidth,
 
  177                           double widthScaleFactor, 
bool forceVectorOutput = 
false, 
double fixedAspectRatio = 0, 
bool blocking = 
false,
 
  178                           const QMap<QString, QString> ¶meters = QMap<QString, QString>() );
 
  197    QSizeF svgViewboxSize( 
const QString &path, 
double size, 
const QColor &fill, 
const QColor &stroke, 
double strokeWidth,
 
  198                           double widthScaleFactor, 
double fixedAspectRatio = 0, 
bool blocking = 
false, 
const QMap<QString, QString> ¶meters = QMap<QString, QString>() );
 
  206    void containsParams( 
const QString &path, 
bool &hasFillParam, QColor &defaultFillColor, 
bool &hasStrokeParam, QColor &defaultStrokeColor, 
bool &hasStrokeWidthParam,
 
  207                         double &defaultStrokeWidth, 
bool blocking = 
false ) 
const;
 
  236    void containsParams( 
const QString &path, 
bool &hasFillParam, 
bool &hasDefaultFillParam, QColor &defaultFillColor,
 
  237                         bool &hasFillOpacityParam, 
bool &hasDefaultFillOpacity, 
double &defaultFillOpacity,
 
  238                         bool &hasStrokeParam, 
bool &hasDefaultStrokeColor, QColor &defaultStrokeColor,
 
  239                         bool &hasStrokeWidthParam, 
bool &hasDefaultStrokeWidth, 
double &defaultStrokeWidth,
 
  240                         bool &hasStrokeOpacityParam, 
bool &hasDefaultStrokeOpacity, 
double &defaultStrokeOpacity,
 
  241                         bool blocking = 
false ) 
const SIP_PYNAME( containsParamsV3 );
 
  257    QByteArray getImageData( 
const QString &path, 
bool blocking = 
false ) 
const;
 
  275    QByteArray svgContent( 
const QString &path, 
double size, 
const QColor &fill, 
const QColor &stroke, 
double strokeWidth,
 
  276                           double widthScaleFactor, 
double fixedAspectRatio = 0, 
bool blocking = 
false, 
const QMap<QString, QString> ¶meters = QMap<QString, QString>(), 
bool *isMissingImage = 
nullptr );
 
  278    QByteArray svgContent( 
const QString &path, 
double size, 
const QColor &fill, 
const QColor &stroke, 
double strokeWidth,
 
  279                           double widthScaleFactor, 
double fixedAspectRatio = 0, 
bool blocking = 
false, 
const QMap<QString, QString> ¶meters = QMap<QString, QString>() );
 
  298    bool checkReply( QNetworkReply *reply, 
const QString &path ) 
const override;
 
  302    void replaceParamsAndCacheSvg( QgsSvgCacheEntry *entry, 
bool blocking = 
false );
 
  303    void cacheImage( QgsSvgCacheEntry *entry );
 
  304    void cachePicture( QgsSvgCacheEntry *entry, 
bool forceVectorOutput = 
false );
 
  306    QgsSvgCacheEntry *cacheEntry( 
const QString &path, 
double size, 
const QColor &fill, 
const QColor &stroke, 
double strokeWidth,
 
  307                                  double widthScaleFactor, 
double fixedAspectRatio = 0, 
const QMap<QString, QString> ¶meters = QMap<QString, QString>(), 
bool blocking = 
false, 
bool *isMissingImage = 
nullptr );
 
  310    void replaceElemParams( QDomElement &elem, 
const QColor &fill, 
const QColor &stroke, 
double strokeWidth, 
const QMap<QString, QString> ¶meters );
 
  312    void containsElemParams( 
const QDomElement &elem,
 
  313                             bool &hasFillParam, 
bool &hasDefaultFill, QColor &defaultFill,
 
  314                             bool &hasFillOpacityParam, 
bool &hasDefaultFillOpacity, 
double &defaultFillOpacity,
 
  315                             bool &hasStrokeParam, 
bool &hasDefaultStroke, QColor &defaultStroke,
 
  316                             bool &hasStrokeWidthParam, 
bool &hasDefaultStrokeWidth, 
double &defaultStrokeWidth,
 
  317                             bool &hasStrokeOpacityParam, 
bool &hasDefaultStrokeOpacity, 
double &defaultStrokeOpacity ) 
const SIP_PYNAME( containsParamsV3 );
 
  320    double calcSizeScaleFactor( QgsSvgCacheEntry *entry, 
const QDomElement &docElem, QSizeF &viewboxSize ) 
const;
 
  326    QSize sizeForImage( 
const QgsSvgCacheEntry &entry, QSizeF &viewBoxSize, QSizeF &scaledSize ) 
const;
 
  331    QImage imageFromCachedPicture( 
const QgsSvgCacheEntry &entry ) 
const;
 
  334    QByteArray mMissingSvg;
 
  336    QByteArray mFetchingSvg;
 
  338    friend class TestQgsSvgCache;
 
 
A QObject derived base class for QgsAbstractContentCache.
 
Base class for entries in a QgsAbstractContentCache.
 
virtual int dataSize() const =0
Returns the memory usage in bytes for the entry.
 
virtual void dump() const =0
Dumps debugging strings containing the item's properties.
 
QgsAbstractContentCacheEntry & operator=(const QgsAbstractContentCacheEntry &rh)=delete
 
virtual bool isEqual(const QgsAbstractContentCacheEntry *other) const =0
Tests whether this entry matches another entry.
 
Abstract base class for file content caches, such as SVG or raster image caches.