Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsvghandler.cpp File Reference

(8d78debf79c813a0d8a1f3335cf16815b35bf363)

#include "qplatformdefs.h"
#include "qsvghandler_p.h"
#include "qsvgdocument_p.h"
#include "qsvgstructure_p.h"
#include "qsvgfilter_p.h"
#include "qsvgnode_p.h"
#include "qsvganimate_p.h"
#include "qpen.h"
#include "qpainterpath.h"
#include "qbrush.h"
#include "qcolor.h"
#include "qtextformat.h"
#include <QtCore/private/qdataurl_p.h>
#include "qlist.h"
#include "qfileinfo.h"
#include "qfile.h"
#include "qdir.h"
#include "qdebug.h"
#include "qmath.h"
#include "qnumeric.h"
#include <qregularexpression.h>
#include "qtransform.h"
#include "qvarlengtharray.h"
#include "qimagereader.h"
#include "float.h"
#include <algorithm>
#include <memory>
Include dependency graph for qsvghandler.cpp:

Go to the source code of this file.

Classes

struct  QSvgAttributes

Namespaces

namespace  tokens
namespace  tokens::compOp

Typedefs

typedef QSvgNode *(*) FactoryMethod(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
typedef QSvgNode *(*) AnimationMethod(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
typedef bool(*) ParseMethod(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
typedef QSvgFontPtr(*) FontFactoryMethod(const QXmlStreamAttributes &, QSvgHandler *)
typedef bool(*) FontParseMethod(QSvgFont *, const QXmlStreamAttributes &, QSvgHandler *)
typedef QSvgPaintServerSharedPtr(*) PaintServerFactoryMethod(const QXmlStreamAttributes &, QSvgHandler *)
typedef bool(*) PaintServerParseMethod(QSvgPaintServer *, const QXmlStreamAttributes &, QSvgHandler *)

Enumerations

enum  FontSizeSpec {
  XXSmall , XSmall , Small , Medium ,
  Large , XLarge , XXLarge , FontSizeNone ,
  FontSizeValue , XXSmall , XSmall , Small ,
  Medium , Large , XLarge , XXLarge ,
  FontSizeNone , FontSizeValue
}
enum  FontSizeSpec {
  XXSmall , XSmall , Small , Medium ,
  Large , XLarge , XXLarge , FontSizeNone ,
  FontSizeValue , XXSmall , XSmall , Small ,
  Medium , Large , XLarge , XXLarge ,
  FontSizeNone , FontSizeValue
}

Functions

static QByteArray prefixMessage (const QByteArray &msg, const QXmlStreamReader *rr)
static QByteArray msgProblemParsing (QStringView localName, const QXmlStreamReader *rr)
static QByteArray msgCouldNotResolveProperty (QStringView idid, const QXmlStreamReader *rr)
static QList< QStringView > splitWithDelimiter (QStringView delimitedList)
static int qsvg_h2i (char hex, bool *ok=nullptr)
static int qsvg_hex2int (const char *ss, bool *ok=nullptr)
static int qsvg_hex2int (char ss, bool *ok=nullptr)
bool qsvg_get_hex_rgb (const char *namename, QRgb *rgb)
bool qsvg_get_hex_rgb (const QChar *str, int lenlen, QRgb *rgb)
static QString someId (const QXmlStreamAttributes &attributes)
QList< qreal > parseNumbersList (QStringView *str)
static QList< qreal > parsePercentageList (QStringView str)
static QStringView idFromIRI (QStringView iri)
static QStringView idFromFuncIRI (QStringView iri)
bool resolveColor (QStringView colorStr, QColor &colorcolor, QSvgHandler *handler)
void setAlpha (QStringView opacity, QColor *colorcolor)
static bool constructColor (QStringView colorStr, QStringView opacity, QColor &colorcolor, QSvgHandler *handler)
static qreal convertToNumber (QStringView str, bool tiny12FeaturesOnly, bool *ok=NULL)
static bool createSvgGlyph (QSvgFont *font, const QXmlStreamAttributes &attributes, bool isMissingGlyph, QSvgHandler *handler)
static void parseColor (QSvgNode *, const QSvgAttributes &attributes, QSvgHandler *handler)
static QSvgPaintServerSharedPtr paintServerFromUrl (QSvgDocument *doc, QStringView url)
static void parseBrush (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
static QTransform parseTransformationMatrix (QStringView valuevalue)
static void parsePen (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
 Q_STATIC_ASSERT (sizeof(sizeTable)/sizeof(sizeTable[0])==FontSizeNone)
static FontSizeSpec fontSizeSpec (QStringView spec)
static std::optional< QFont::Style > parseFontStyle (QStringView ss)
static std::optional< qreal > parseFontSize (QStringView ss, bool tiny12FeaturesOnly)
static std::optional< int > parseFontWeight (QStringView ss)
static std::optional< QFont::Capitalization > parseFontVariant (const QSvgAttributes &attributes)
static std::optional< Qt::Alignment > parseTextAnchor (QStringView ss)
static void parseFont (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
static void parseTransform (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static void parseVisibility (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static bool parseStyle (QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static int parseClockValue (QStringView str, bool *ok)
static void parseCssAnimations (QSvgNode *node, const QSvgCssProperties &properties, QSvgHandler *handler)
static void parseOffsetPath (QSvgNode *node, const QSvgCssProperties &properties)
static QStringList stringToList (const QString &str)
static bool parseCoreNode (QSvgNode *node, const QXmlStreamAttributes &attributes)
static void parseOpacity (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static QPainter::CompositionMode svgToQtCompositionMode (const QStringView op)
static void parseCompOp (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static QSvgNode::DisplayMode displayStringToEnum (const QStringView str)
static void parseOthers (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static std::optional< QStringView > getAttributeId (const QStringView &attributeattribute)
static void parseExtendedAttributes (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
static void parseRenderingHints (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static bool parseAnchorNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseBaseAnimate (QSvgNode *, const QXmlStreamAttributes &attributes, QSvgAnimateNode *anim, QSvgHandler *handler)
static void generateKeyFrames (QList< qreal > &keyFrames, uint countcount)
static QSvgNode * createAnimateColorNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createAnimateMotionNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseNumberTriplet (QList< qreal > &valuesvalues, QStringView *ss)
static void parseNumberTriplet (QList< qreal > &valuesvalues, QStringView ss)
QSvgNode * createAnimateTransformNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createAnimateNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseAudioNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createCircleNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createDefsNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseDiscardNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createEllipseNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgFontPtr createFontNode (const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseFontFaceNode (QSvgFont *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseFontFaceNameNode (QSvgFont *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseFontFaceSrcNode (QSvgFont *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseFontFaceUriNode (QSvgFont *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseGlyphNode (QSvgFont *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseMissingGlyphNode (QSvgFont *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseForeignObjectNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createGNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseHandlerNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseHkernNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createImageNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createLineNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseBaseGradient (const QXmlStreamAttributes &attributes, QSvgGradientPaint *gradProp, QSvgHandler *handler)
static QSvgPaintServerSharedPtr createLinearGradientNode (const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseMetadataNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseMpathNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseMaskNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseMarkerNode (QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
static QSvgNode * createMaskNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static void parseFilterBounds (const QXmlStreamAttributes &attributes, QSvgRectF *rect)
static QSvgNode * createFilterNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static void parseFilterAttributes (const QXmlStreamAttributes &attributes, QString *inString, QString *outString, QSvgRectF *rect)
static QSvgNode * createFeColorMatrixNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeGaussianBlurNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeOffsetNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeCompositeNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeMergeNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeFloodNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createFeMergeNodeNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeBlendNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeUnsupportedNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static std::optional< QRectF > parseViewBox (QStringView str)
static bool parseSymbolLikeAttributes (const QXmlStreamAttributes &attributes, QSvgHandler *handler, QRectF *rect, QRectF *viewBox, QPointF *refPoint, QSvgSymbolLike::PreserveAspectRatios *aspect, QSvgSymbolLike::Overflow *overflow, bool markermarker=false)
static QSvgNode * createSymbolNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createMarkerNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createPathNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createPolyNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, bool createLine)
static QSvgNode * createPolygonNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createPolylineNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parsePrefetchNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgPaintServerSharedPtr createRadialGradientNode (const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createRectNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseScriptNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseSetNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgPaintServerSharedPtr createSolidColorNode (const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseStopNode (QSvgPaintServer *paintServer, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseStyleNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createSvgNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createSwitchNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createPatternNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseTbreakNode (QSvgNode *parent, const QXmlStreamAttributes &, QSvgHandler *)
static QSvgNode * createTextNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createTextAreaNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createTspanNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createUseNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createVideoNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static FactoryMethod findGroupFactory (const QStringView namename, QtSvg::Options options)
static FactoryMethod findGraphicsFactory (const QStringView namename, QtSvg::Options options)
static FactoryMethod findFilterFactory (const QStringView namename, QtSvg::Options options)
static AnimationMethod findAnimationFactory (const QStringView namename, QtSvg::Options options)
static ParseMethod findUtilFactory (const QStringView namename, QtSvg::Options options)
static FontFactoryMethod findFontFactoryMethod (const QStringView namename)
static FontParseMethod findFontParseFactoryMethod (const QStringView namename)
static PaintServerFactoryMethod findPaintServerFactoryMethod (const QStringView namename)
static PaintServerParseMethod findPaintServerUtilFactoryMethod (const QStringView namename)
static bool detectPatternCycles (const QSvgNode *node, QList< const QSvgNode * > &linkable)
static bool detectCycles (const QSvgNode *nn)
static bool detectCyclesAndWarn (const QSvgNode *node)

Variables

static const qreal sizeTable []
static const int unfinishedElementsLimit = 2048

Typedef Documentation

◆ AnimationMethod

typedef QSvgNode *(*) AnimationMethod(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3464 of file qsvghandler.cpp.

◆ FactoryMethod

typedef QSvgNode *(*) FactoryMethod(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3340 of file qsvghandler.cpp.

◆ FontFactoryMethod

typedef QSvgFontPtr(*) FontFactoryMethod(const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3533 of file qsvghandler.cpp.

◆ FontParseMethod

typedef bool(*) FontParseMethod(QSvgFont *, const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3544 of file qsvghandler.cpp.

◆ PaintServerFactoryMethod

typedef QSvgPaintServerSharedPtr(*) PaintServerFactoryMethod(const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3573 of file qsvghandler.cpp.

◆ PaintServerParseMethod

typedef bool(*) PaintServerParseMethod(QSvgPaintServer *, const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3598 of file qsvghandler.cpp.

◆ ParseMethod

typedef bool(*) ParseMethod(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3487 of file qsvghandler.cpp.

Enumeration Type Documentation

◆ FontSizeSpec [1/2]

Enumerator
XXSmall 
XSmall 
Small 
Medium 
Large 
XLarge 
XXLarge 
FontSizeNone 
FontSizeValue 
XXSmall 
XSmall 
Small 
Medium 
Large 
XLarge 
XXLarge 
FontSizeNone 
FontSizeValue 

Definition at line 902 of file qsvghandler.cpp.

◆ FontSizeSpec [2/2]

Enumerator
XXSmall 
XSmall 
Small 
Medium 
Large 
XLarge 
XXLarge 
FontSizeNone 
FontSizeValue 
XXSmall 
XSmall 
Small 
Medium 
Large 
XLarge 
XXLarge 
FontSizeNone 
FontSizeValue 

Definition at line 902 of file qsvghandler.cpp.

Function Documentation

◆ constructColor()

bool constructColor ( QStringView colorStr,
QStringView opacity,
QColor & color,
QSvgHandler * handler )
static

Definition at line 556 of file qsvghandler.cpp.

◆ convertToNumber()

qreal convertToNumber ( QStringView str,
bool tiny12FeaturesOnly,
bool * ok = NULL )
inlinestatic

Definition at line 566 of file qsvghandler.cpp.

◆ createAnimateColorNode()

QSvgNode * createAnimateColorNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1578 of file qsvghandler.cpp.

◆ createAnimateMotionNode()

QSvgNode * createAnimateMotionNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1628 of file qsvghandler.cpp.

◆ createAnimateNode()

QSvgNode * createAnimateNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1751 of file qsvghandler.cpp.

◆ createAnimateTransformNode()

QSvgNode * createAnimateTransformNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )

Definition at line 1649 of file qsvghandler.cpp.

◆ createCircleNode()

QSvgNode * createCircleNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1767 of file qsvghandler.cpp.

◆ createDefsNode()

QSvgNode * createDefsNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1785 of file qsvghandler.cpp.

◆ createEllipseNode()

QSvgNode * createEllipseNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1802 of file qsvghandler.cpp.

◆ createFeBlendNode()

QSvgNode * createFeBlendNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2569 of file qsvghandler.cpp.

◆ createFeColorMatrixNode()

QSvgNode * createFeColorMatrixNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2348 of file qsvghandler.cpp.

◆ createFeCompositeNode()

QSvgNode * createFeCompositeNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2460 of file qsvghandler.cpp.

◆ createFeFloodNode()

QSvgNode * createFeFloodNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2529 of file qsvghandler.cpp.

◆ createFeGaussianBlurNode()

QSvgNode * createFeGaussianBlurNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2393 of file qsvghandler.cpp.

◆ createFeMergeNode()

QSvgNode * createFeMergeNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2515 of file qsvghandler.cpp.

◆ createFeMergeNodeNode()

QSvgNode * createFeMergeNodeNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2555 of file qsvghandler.cpp.

◆ createFeOffsetNode()

QSvgNode * createFeOffsetNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2426 of file qsvghandler.cpp.

◆ createFeUnsupportedNode()

QSvgNode * createFeUnsupportedNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2597 of file qsvghandler.cpp.

◆ createFilterNode()

QSvgNode * createFilterNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2294 of file qsvghandler.cpp.

References QtSvg::objectBoundingBox, and QtSvg::userSpaceOnUse.

◆ createFontNode()

QSvgFontPtr createFontNode ( const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1820 of file qsvghandler.cpp.

◆ createGNode()

QSvgNode * createGNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1900 of file qsvghandler.cpp.

◆ createImageNode()

QSvgNode * createImageNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1925 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

◆ createLinearGradientNode()

QSvgPaintServerSharedPtr createLinearGradientNode ( const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2088 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

◆ createLineNode()

QSvgNode * createLineNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2007 of file qsvghandler.cpp.

◆ createMarkerNode()

QSvgNode * createMarkerNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2766 of file qsvghandler.cpp.

◆ createMaskNode()

QSvgNode * createMaskNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2151 of file qsvghandler.cpp.

References QtSvg::objectBoundingBox, and QtSvg::userSpaceOnUse.

◆ createPathNode()

QSvgNode * createPathNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2812 of file qsvghandler.cpp.

◆ createPatternNode()

QSvgNode * createPatternNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 3131 of file qsvghandler.cpp.

References QtSvg::objectBoundingBox, and QtSvg::userSpaceOnUse.

◆ createPolygonNode()

QSvgNode * createPolygonNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2847 of file qsvghandler.cpp.

◆ createPolylineNode()

QSvgNode * createPolylineNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2854 of file qsvghandler.cpp.

◆ createPolyNode()

QSvgNode * createPolyNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
bool createLine )
static

Definition at line 2830 of file qsvghandler.cpp.

◆ createRadialGradientNode()

QSvgPaintServerSharedPtr createRadialGradientNode ( const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2869 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

◆ createRectNode()

QSvgNode * createRectNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2908 of file qsvghandler.cpp.

◆ createSolidColorNode()

QSvgPaintServerSharedPtr createSolidColorNode ( const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2975 of file qsvghandler.cpp.

◆ createSvgGlyph()

bool createSvgGlyph ( QSvgFont * font,
const QXmlStreamAttributes & attributes,
bool isMissingGlyph,
QSvgHandler * handler )
static

Definition at line 576 of file qsvghandler.cpp.

◆ createSvgNode()

QSvgNode * createSvgNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 3080 of file qsvghandler.cpp.

◆ createSwitchNode()

QSvgNode * createSwitchNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 3122 of file qsvghandler.cpp.

◆ createSymbolNode()

QSvgNode * createSymbolNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2749 of file qsvghandler.cpp.

◆ createTextAreaNode()

QSvgNode * createTextAreaNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 3242 of file qsvghandler.cpp.

◆ createTextNode()

QSvgNode * createTextNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 3225 of file qsvghandler.cpp.

◆ createTspanNode()

QSvgNode * createTspanNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 3256 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

◆ createUseNode()

QSvgNode * createUseNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 3282 of file qsvghandler.cpp.

◆ createVideoNode()

QSvgNode * createVideoNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 3332 of file qsvghandler.cpp.

◆ detectCycles()

bool detectCycles ( const QSvgNode * n)
static

Definition at line 3695 of file qsvghandler.cpp.

Referenced by detectCyclesAndWarn().

Here is the caller graph for this function:

◆ detectCyclesAndWarn()

bool detectCyclesAndWarn ( const QSvgNode * node)
static

Definition at line 3759 of file qsvghandler.cpp.

References detectCycles().

Here is the call graph for this function:

◆ detectPatternCycles()

bool detectPatternCycles ( const QSvgNode * node,
QList< const QSvgNode * > & linkable )
static

Definition at line 3655 of file qsvghandler.cpp.

◆ displayStringToEnum()

QSvgNode::DisplayMode displayStringToEnum ( const QStringView str)
static

Definition at line 1370 of file qsvghandler.cpp.

◆ findAnimationFactory()

AnimationMethod findAnimationFactory ( const QStringView name,
QtSvg::Options options )
static

Definition at line 3466 of file qsvghandler.cpp.

References QtSvg::DisableSMILAnimations.

◆ findFilterFactory()

FactoryMethod findFilterFactory ( const QStringView name,
QtSvg::Options options )
static

Definition at line 3421 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

◆ findFontFactoryMethod()

FontFactoryMethod findFontFactoryMethod ( const QStringView name)
static

Definition at line 3536 of file qsvghandler.cpp.

◆ findFontParseFactoryMethod()

FontParseMethod findFontParseFactoryMethod ( const QStringView name)
static

Definition at line 3548 of file qsvghandler.cpp.

◆ findGraphicsFactory()

FactoryMethod findGraphicsFactory ( const QStringView name,
QtSvg::Options options )
static

Definition at line 3376 of file qsvghandler.cpp.

◆ findGroupFactory()

FactoryMethod findGroupFactory ( const QStringView name,
QtSvg::Options options )
static

Definition at line 3342 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

◆ findPaintServerFactoryMethod()

PaintServerFactoryMethod findPaintServerFactoryMethod ( const QStringView name)
static

Definition at line 3576 of file qsvghandler.cpp.

◆ findPaintServerUtilFactoryMethod()

PaintServerParseMethod findPaintServerUtilFactoryMethod ( const QStringView name)
static

Definition at line 3602 of file qsvghandler.cpp.

◆ findUtilFactory()

ParseMethod findUtilFactory ( const QStringView name,
QtSvg::Options options )
static

Definition at line 3489 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

◆ fontSizeSpec()

FontSizeSpec fontSizeSpec ( QStringView spec)
static

Definition at line 910 of file qsvghandler.cpp.

References FontSizeNone, FontSizeValue, Large, Medium, Small, XLarge, XSmall, XXLarge, and XXSmall.

◆ generateKeyFrames()

void generateKeyFrames ( QList< qreal > & keyFrames,
uint count )
static

Definition at line 1567 of file qsvghandler.cpp.

◆ getAttributeId()

std::optional< QStringView > getAttributeId ( const QStringView & attribute)
static

Definition at line 1425 of file qsvghandler.cpp.

◆ idFromFuncIRI()

QStringView idFromFuncIRI ( QStringView iri)
static

The form is <FuncIRI>, where FuncIRI takes the form of url(<IRI>). This syntax is used in properties that accept both strings and IRIs, eliminating any ambiguity. e.g, fill = "url(#id)"

Definition at line 462 of file qsvghandler.cpp.

◆ idFromIRI()

QStringView idFromIRI ( QStringView iri)
static

The form is <IRI>. This function parses local IRI references, i.e, resources referenced within the current document. e.g, href = "#id"

Definition at line 446 of file qsvghandler.cpp.

◆ msgCouldNotResolveProperty()

QByteArray msgCouldNotResolveProperty ( QStringView id,
const QXmlStreamReader * r )
inlinestatic

Definition at line 118 of file qsvghandler.cpp.

◆ msgProblemParsing()

QByteArray msgProblemParsing ( QStringView localName,
const QXmlStreamReader * r )
inlinestatic

Definition at line 113 of file qsvghandler.cpp.

◆ paintServerFromUrl()

QSvgPaintServerSharedPtr paintServerFromUrl ( QSvgDocument * doc,
QStringView url )
static

Definition at line 614 of file qsvghandler.cpp.

◆ parseAnchorNode()

bool parseAnchorNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1510 of file qsvghandler.cpp.

◆ parseAudioNode()

bool parseAudioNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1759 of file qsvghandler.cpp.

◆ parseBaseAnimate()

bool parseBaseAnimate ( QSvgNode * ,
const QXmlStreamAttributes & attributes,
QSvgAnimateNode * anim,
QSvgHandler * handler )
static

Definition at line 1518 of file qsvghandler.cpp.

◆ parseBaseGradient()

void parseBaseGradient ( const QXmlStreamAttributes & attributes,
QSvgGradientPaint * gradProp,
QSvgHandler * handler )
static

Definition at line 2026 of file qsvghandler.cpp.

◆ parseBrush()

void parseBrush ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 620 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseClockValue()

int parseClockValue ( QStringView str,
bool * ok )
static

Definition at line 1149 of file qsvghandler.cpp.

◆ parseColor()

void parseColor ( QSvgNode * ,
const QSvgAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 603 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseCompOp()

void parseCompOp ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1356 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseCoreNode()

bool parseCoreNode ( QSvgNode * node,
const QXmlStreamAttributes & attributes )
static

Definition at line 1233 of file qsvghandler.cpp.

◆ parseCssAnimations()

void parseCssAnimations ( QSvgNode * node,
const QSvgCssProperties & properties,
QSvgHandler * handler )
static

Definition at line 1172 of file qsvghandler.cpp.

◆ parseDiscardNode()

bool parseDiscardNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1794 of file qsvghandler.cpp.

◆ parseExtendedAttributes()

void parseExtendedAttributes ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1433 of file qsvghandler.cpp.

References QtSvg::Tiny12FeaturesOnly.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseFilterAttributes()

void parseFilterAttributes ( const QXmlStreamAttributes & attributes,
QString * inString,
QString * outString,
QSvgRectF * rect )
static

Definition at line 2329 of file qsvghandler.cpp.

References QtSvg::unknown.

◆ parseFilterBounds()

void parseFilterBounds ( const QXmlStreamAttributes & attributes,
QSvgRectF * rect )
static

Definition at line 2229 of file qsvghandler.cpp.

References QtSvg::objectBoundingBox, and QtSvg::userSpaceOnUse.

◆ parseFont()

void parseFont ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1075 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseFontFaceNameNode()

bool parseFontFaceNameNode ( QSvgFont * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1854 of file qsvghandler.cpp.

◆ parseFontFaceNode()

bool parseFontFaceNode ( QSvgFont * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1830 of file qsvghandler.cpp.

◆ parseFontFaceSrcNode()

bool parseFontFaceSrcNode ( QSvgFont * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1862 of file qsvghandler.cpp.

◆ parseFontFaceUriNode()

bool parseFontFaceUriNode ( QSvgFont * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1870 of file qsvghandler.cpp.

◆ parseFontSize()

std::optional< qreal > parseFontSize ( QStringView s,
bool tiny12FeaturesOnly )
static

Definition at line 960 of file qsvghandler.cpp.

References FontSizeNone, FontSizeValue, Large, Medium, Small, XLarge, XSmall, XXLarge, and XXSmall.

◆ parseFontStyle()

std::optional< QFont::Style > parseFontStyle ( QStringView s)
static

Definition at line 945 of file qsvghandler.cpp.

◆ parseFontVariant()

std::optional< QFont::Capitalization > parseFontVariant ( const QSvgAttributes & attributes)
static

Definition at line 1023 of file qsvghandler.cpp.

◆ parseFontWeight()

std::optional< int > parseFontWeight ( QStringView s)
static

Definition at line 998 of file qsvghandler.cpp.

◆ parseForeignObjectNode()

bool parseForeignObjectNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1892 of file qsvghandler.cpp.

◆ parseGlyphNode()

bool parseGlyphNode ( QSvgFont * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1878 of file qsvghandler.cpp.

◆ parseHandlerNode()

bool parseHandlerNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1909 of file qsvghandler.cpp.

◆ parseHkernNode()

bool parseHkernNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1917 of file qsvghandler.cpp.

◆ parseMarkerNode()

bool parseMarkerNode ( QSvgNode * ,
const QXmlStreamAttributes & ,
QSvgHandler *  )
static

Definition at line 2144 of file qsvghandler.cpp.

◆ parseMaskNode()

bool parseMaskNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2136 of file qsvghandler.cpp.

◆ parseMetadataNode()

bool parseMetadataNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2120 of file qsvghandler.cpp.

◆ parseMissingGlyphNode()

bool parseMissingGlyphNode ( QSvgFont * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1885 of file qsvghandler.cpp.

◆ parseMpathNode()

bool parseMpathNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2128 of file qsvghandler.cpp.

◆ parseNumbersList()

QList< qreal > parseNumbersList ( QStringView * str)

Definition at line 384 of file qsvghandler.cpp.

◆ parseNumberTriplet() [1/2]

void parseNumberTriplet ( QList< qreal > & values,
QStringView * s )
static

Definition at line 1636 of file qsvghandler.cpp.

◆ parseNumberTriplet() [2/2]

void parseNumberTriplet ( QList< qreal > & values,
QStringView s )
static

Definition at line 1644 of file qsvghandler.cpp.

◆ parseOffsetPath()

void parseOffsetPath ( QSvgNode * node,
const QSvgCssProperties & properties )
static

Definition at line 1194 of file qsvghandler.cpp.

◆ parseOpacity()

void parseOpacity ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1283 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseOthers()

void parseOthers ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1412 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parsePen()

void parsePen ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 793 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parsePercentageList()

QList< qreal > parsePercentageList ( QStringView str)
static

Definition at line 412 of file qsvghandler.cpp.

◆ parsePrefetchNode()

bool parsePrefetchNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2861 of file qsvghandler.cpp.

◆ parseRenderingHints()

void parseRenderingHints ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1452 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseScriptNode()

bool parseScriptNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2959 of file qsvghandler.cpp.

◆ parseSetNode()

bool parseSetNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler *  )
static

Definition at line 2967 of file qsvghandler.cpp.

◆ parseStopNode()

bool parseStopNode ( QSvgPaintServer * paintServer,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 2992 of file qsvghandler.cpp.

◆ parseStyle()

bool parseStyle ( QSvgNode * node,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 1470 of file qsvghandler.cpp.

References QtSvg::DisableCSSAnimations, parseBrush(), parseColor(), parseCompOp(), parseExtendedAttributes(), parseFont(), parseOpacity(), parseOthers(), parsePen(), parseRenderingHints(), parseTransform(), and parseVisibility().

Here is the call graph for this function:

◆ parseStyleNode()

bool parseStyleNode ( QSvgNode * parent,
const QXmlStreamAttributes & attributes,
QSvgHandler * handler )
static

Definition at line 3067 of file qsvghandler.cpp.

◆ parseSymbolLikeAttributes()

bool parseSymbolLikeAttributes ( const QXmlStreamAttributes & attributes,
QSvgHandler * handler,
QRectF * rect,
QRectF * viewBox,
QPointF * refPoint,
QSvgSymbolLike::PreserveAspectRatios * aspect,
QSvgSymbolLike::Overflow * overflow,
bool marker = false )
static

Definition at line 2628 of file qsvghandler.cpp.

◆ parseTbreakNode()

bool parseTbreakNode ( QSvgNode * parent,
const QXmlStreamAttributes & ,
QSvgHandler *  )
static

Definition at line 3215 of file qsvghandler.cpp.

◆ parseTextAnchor()

std::optional< Qt::Alignment > parseTextAnchor ( QStringView s)
static

Definition at line 1057 of file qsvghandler.cpp.

◆ parseTransform()

void parseTransform ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1117 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ parseTransformationMatrix()

QTransform parseTransformationMatrix ( QStringView value)
static

Definition at line 666 of file qsvghandler.cpp.

◆ parseViewBox()

std::optional< QRectF > parseViewBox ( QStringView str)
static

Definition at line 2611 of file qsvghandler.cpp.

◆ parseVisibility()

void parseVisibility ( QSvgNode * node,
const QSvgAttributes & attributes,
QSvgHandler *  )
static

Definition at line 1131 of file qsvghandler.cpp.

Referenced by parseStyle().

Here is the caller graph for this function:

◆ prefixMessage()

QByteArray prefixMessage ( const QByteArray & msg,
const QXmlStreamReader * r )
static

Definition at line 93 of file qsvghandler.cpp.

◆ Q_STATIC_ASSERT()

Q_STATIC_ASSERT ( sizeof(sizeTable)/sizeof(sizeTable[0]) = =FontSizeNone)

◆ qsvg_get_hex_rgb() [1/2]

bool qsvg_get_hex_rgb ( const char * name,
QRgb * rgb )

Definition at line 155 of file qsvghandler.cpp.

References qsvg_hex2int(), and qsvg_hex2int().

Here is the call graph for this function:

◆ qsvg_get_hex_rgb() [2/2]

bool qsvg_get_hex_rgb ( const QChar * str,
int len,
QRgb * rgb )

Definition at line 190 of file qsvghandler.cpp.

◆ qsvg_h2i()

int qsvg_h2i ( char hex,
bool * ok = nullptr )
inlinestatic

Definition at line 131 of file qsvghandler.cpp.

Referenced by qsvg_hex2int(), and qsvg_hex2int().

Here is the caller graph for this function:

◆ qsvg_hex2int() [1/2]

int qsvg_hex2int ( char s,
bool * ok = nullptr )
inlinestatic

Definition at line 149 of file qsvghandler.cpp.

References qsvg_h2i().

Referenced by qsvg_get_hex_rgb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ qsvg_hex2int() [2/2]

int qsvg_hex2int ( const char * s,
bool * ok = nullptr )
inlinestatic

Definition at line 144 of file qsvghandler.cpp.

References qsvg_h2i().

Referenced by qsvg_get_hex_rgb().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resolveColor()

bool resolveColor ( QStringView colorStr,
QColor & color,
QSvgHandler * handler )

returns true when successfully set the color. false signifies that the color should be inherited

Definition at line 483 of file qsvghandler.cpp.

◆ setAlpha()

void setAlpha ( QStringView opacity,
QColor * color )

Definition at line 547 of file qsvghandler.cpp.

◆ someId()

QString someId ( const QXmlStreamAttributes & attributes)
inlinestatic

Definition at line 203 of file qsvghandler.cpp.

◆ splitWithDelimiter()

QList< QStringView > splitWithDelimiter ( QStringView delimitedList)
static

Definition at line 123 of file qsvghandler.cpp.

◆ stringToList()

QStringList stringToList ( const QString & str)
inlinestatic

Definition at line 1227 of file qsvghandler.cpp.

◆ svgToQtCompositionMode()

QPainter::CompositionMode svgToQtCompositionMode ( const QStringView op)
static

Definition at line 1301 of file qsvghandler.cpp.

Variable Documentation

◆ sizeTable

const qreal sizeTable
static
Initial value:
=
{ qreal(6.9), qreal(8.3), qreal(10.0), qreal(12.0), qreal(14.4), qreal(17.3), qreal(20.7) }
double qreal
Definition qtypes.h:206

Definition at line 905 of file qsvghandler.cpp.

◆ unfinishedElementsLimit

const int unfinishedElementsLimit = 2048
static

Definition at line 3768 of file qsvghandler.cpp.