Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qsvghandler.cpp File Reference
#include "qplatformdefs.h"
#include "qsvghandler_p.h"
#include "qsvgtinydocument_p.h"
#include "qsvgstructure_p.h"
#include "qsvggraphics_p.h"
#include "qsvgnode_p.h"
#include "qsvgfont_p.h"
#include "qpen.h"
#include "qpainterpath.h"
#include "qbrush.h"
#include "qcolor.h"
#include "qtextformat.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 "private/qmath_p.h"
#include "float.h"
#include <cmath>
+ Include dependency graph for qsvghandler.cpp:

Go to the source code of this file.

Classes

struct  QSvgAttributes
 
class  QSvgStyleSelector
 

Macros

#define QT_INHERIT   QLatin1String(qt_inherit_text)
 
#define NOOP   qDebug()<<"Operation: "<<op<<" is not implemented"
 

Typedefs

typedef QSvgNode *(* FactoryMethod) (QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
 
typedef bool(* ParseMethod) (QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
 
typedef QSvgStyleProperty *(* StyleFactoryMethod) (QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
 
typedef bool(* StyleParseMethod) (QSvgStyleProperty *, const QXmlStreamAttributes &, QSvgHandler *)
 

Enumerations

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

Functions

static QByteArray prefixMessage (const QByteArray &msg, const QXmlStreamReader *r)
 
static QByteArray msgProblemParsing (const QString &localName, const QXmlStreamReader *r)
 
static QByteArray msgCouldNotResolveProperty (const QString &id, const QXmlStreamReader *r)
 
static int qsvg_h2i (char hex, bool *ok=nullptr)
 
static int qsvg_hex2int (const char *s, bool *ok=nullptr)
 
static int qsvg_hex2int (char s, bool *ok=nullptr)
 
bool qsvg_get_hex_rgb (const char *name, QRgb *rgb)
 
bool qsvg_get_hex_rgb (const QChar *str, int len, QRgb *rgb)
 
static bool parsePathDataFast (QStringView data, QPainterPath &path)
 
static QString someId (const QXmlStreamAttributes &attributes)
 
static bool isDigit (ushort ch)
 
static qreal toDouble (const QChar *&str)
 
static qreal toDouble (QStringView str, bool *ok=NULL)
 
static QList< qrealparseNumbersList (const QChar *&str)
 
static void parseNumbersArray (const QChar *&str, QVarLengthArray< qreal, 8 > &points, const char *pattern=nullptr)
 
static QList< qrealparsePercentageList (const QChar *&str)
 
static QString idFromUrl (const QString &url)
 
static bool resolveColor (QStringView colorStr, QColor &color, QSvgHandler *handler)
 
static bool constructColor (QStringView colorStr, QStringView opacity, QColor &color, QSvgHandler *handler)
 
static qreal parseLength (QStringView str, QSvgHandler::LengthType &type, QSvgHandler *handler, bool *ok=NULL)
 
static qreal convertToNumber (QStringView str, QSvgHandler *handler, bool *ok=NULL)
 
static bool createSvgGlyph (QSvgFont *font, const QXmlStreamAttributes &attributes)
 
static qreal convertToPixels (qreal len, bool, QSvgHandler::LengthType type)
 
static void parseColor (QSvgNode *, const QSvgAttributes &attributes, QSvgHandler *handler)
 
static QSvgStylePropertystyleFromUrl (QSvgNode *node, const QString &url)
 
static void parseBrush (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
 
static QTransform parseTransformationMatrix (QStringView value)
 
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 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 void pathArcSegment (QPainterPath &path, qreal xc, qreal yc, qreal th0, qreal th1, qreal rx, qreal ry, qreal xAxisRotation)
 
static void pathArc (QPainterPath &path, qreal rx, qreal ry, qreal x_axis_rotation, int large_arc_flag, int sweep_flag, qreal x, qreal y, qreal curx, qreal cury)
 
static bool parseStyle (QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseStyle (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
 
static void parseCSStoXMLAttrs (const QList< QCss::Declaration > &declarations, QXmlStreamAttributes &attributes)
 
static void cssStyleLookup (QSvgNode *node, QSvgHandler *handler, QSvgStyleSelector *selector)
 
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 QString &op)
 
static void parseCompOp (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
 
static QSvgNode::DisplayMode displayStringToEnum (const QString &str)
 
static void parseOthers (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
 
static void parseRenderingHints (QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
 
static bool parseAnchorNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseAnimateNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static int parseClockValue (QStringView str, bool *ok)
 
static bool parseAnimateColorNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static bool parseAimateMotionNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static void parseNumberTriplet (QList< qreal > &values, const QChar *&s)
 
static bool parseAnimateTransformNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateAnimationNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseAudioNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreateCircleNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreateDefsNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseDescNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseDiscardNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreateEllipseNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgStylePropertycreateFontNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseFontFaceNode (QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseFontFaceNameNode (QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseFontFaceSrcNode (QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseFontFaceUriNode (QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseForeignObjectNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreateGNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseGlyphNode (QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseHandlerNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseHkernNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreateImageNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateLineNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static void parseBaseGradient (QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgGradientStyle *gradProp, QSvgHandler *handler)
 
static QSvgStylePropertycreateLinearGradientNode (QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static bool parseMetadataNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseMissingGlyphNode (QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseMpathNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreatePathNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreatePolygonNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreatePolylineNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parsePrefetchNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgStylePropertycreateRadialGradientNode (QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateRectNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static bool parseScriptNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseSetNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgStylePropertycreateSolidColorNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static bool parseStopNode (QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static bool parseStyleNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateSvgNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateSwitchNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static bool parseTbreakNode (QSvgNode *parent, const QXmlStreamAttributes &, QSvgHandler *)
 
static QSvgNodecreateTextNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateTextAreaNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateTspanNode (QSvgNode *parent, const QXmlStreamAttributes &, QSvgHandler *)
 
static bool parseTitleNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static QSvgNodecreateUseNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
 
static QSvgNodecreateVideoNode (QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
 
static FactoryMethod findGroupFactory (const QString &name)
 
static FactoryMethod findGraphicsFactory (const QString &name)
 
static ParseMethod findUtilFactory (const QString &name)
 
static StyleFactoryMethod findStyleFactoryMethod (const QString &name)
 
static StyleParseMethod findStyleUtilFactoryMethod (const QString &name)
 

Variables

static QT_BEGIN_NAMESPACE const char * qt_inherit_text = "inherit"
 
static const char * QSvgStyleSelector_nodeString []
 
static const qreal sizeTable []
 
static const int unfinishedElementsLimit = 2048
 

Macro Definition Documentation

◆ NOOP

#define NOOP   qDebug()<<"Operation: "<<op<<" is not implemented"

◆ QT_INHERIT

#define QT_INHERIT   QLatin1String(qt_inherit_text)

Definition at line 39 of file qsvghandler.cpp.

Typedef Documentation

◆ FactoryMethod

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

Definition at line 3405 of file qsvghandler.cpp.

◆ ParseMethod

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

Definition at line 3477 of file qsvghandler.cpp.

◆ StyleFactoryMethod

typedef QSvgStyleProperty *(* StyleFactoryMethod) (QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3527 of file qsvghandler.cpp.

◆ StyleParseMethod

typedef bool(* StyleParseMethod) (QSvgStyleProperty *, const QXmlStreamAttributes &, QSvgHandler *)

Definition at line 3556 of file qsvghandler.cpp.

Enumeration Type Documentation

◆ FontSizeSpec

Enumerator
XXSmall 
XSmall 
Small 
Medium 
Large 
XLarge 
XXLarge 
FontSizeNone 
FontSizeValue 

Definition at line 1254 of file qsvghandler.cpp.

Function Documentation

◆ constructColor()

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

Definition at line 853 of file qsvghandler.cpp.

References QStringView::isEmpty(), ok, qMax(), qMin(), resolveColor(), and toDouble().

Referenced by createSolidColorNode(), parseBaseGradient(), parseColor(), and parseStopNode().

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

◆ convertToNumber()

static qreal convertToNumber ( QStringView  str,
QSvgHandler handler,
bool *  ok = NULL 
)
inlinestatic

Definition at line 903 of file qsvghandler.cpp.

References QSvgHandler::LT_PERCENT, ok, parseLength(), and str.

Referenced by createLinearGradientNode(), and parseStopNode().

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

◆ convertToPixels()

static qreal convertToPixels ( qreal  len,
bool  ,
QSvgHandler::LengthType  type 
)
static

Definition at line 932 of file qsvghandler.cpp.

References QSvgHandler::LT_CM, QSvgHandler::LT_IN, QSvgHandler::LT_MM, QSvgHandler::LT_OTHER, QSvgHandler::LT_PC, QSvgHandler::LT_PERCENT, QSvgHandler::LT_PT, and QSvgHandler::LT_PX.

Referenced by createImageNode(), createRectNode(), createSvgNode(), createTextNode(), createUseNode(), and parseFont().

+ Here is the caller graph for this function:

◆ createAnimationNode()

static QSvgNode * createAnimationNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2507 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findGraphicsFactory().

+ Here is the caller graph for this function:

◆ createCircleNode()

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

Definition at line 2523 of file qsvghandler.cpp.

References parent, rect, toDouble(), and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createDefsNode()

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

Definition at line 2541 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findGroupFactory().

+ Here is the caller graph for this function:

◆ createEllipseNode()

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

Definition at line 2566 of file qsvghandler.cpp.

References ellipse, parent, rect, rx(), ry(), toDouble(), and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createFontNode()

static QSvgStyleProperty * createFontNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2584 of file qsvghandler.cpp.

References QSvgTinyDocument::addSvgFont(), QSvgNode::DOC, font, QString::isEmpty(), parent, someId(), QSvgTinyDocument::svgFont(), toDouble(), and QXmlStreamAttributes::value().

Referenced by findStyleFactoryMethod().

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

◆ createGNode()

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

Definition at line 2684 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findGroupFactory().

+ Here is the caller graph for this function:

◆ createImageNode()

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

Definition at line 2723 of file qsvghandler.cpp.

References QFileInfo::absoluteDir(), QDir::absoluteFilePath(), convertToPixels(), QSvgHandler::device(), file, QFile::fileName(), QImage::Format_ARGB32, QImage::Format_ARGB32_Premultiplied, QByteArray::fromBase64(), QImage::fromData(), info, QString::isEmpty(), QUrl::isRelative(), QString::lastIndexOf(), QString::mid(), parent, parseLength(), qCDebug, qCWarning, QString::startsWith(), toDouble(), QString::toLatin1(), QStringView::toString(), QString::trimmed(), url, and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createLinearGradientNode()

static QSvgStyleProperty * createLinearGradientNode ( QSvgNode node,
const QXmlStreamAttributes attributes,
QSvgHandler handler 
)
static

Definition at line 2871 of file qsvghandler.cpp.

References QGradient::ComponentInterpolation, convertToNumber(), QSvgNode::DOC, QSvgNode::parent(), parseBaseGradient(), QGradient::setInterpolationMode(), QSvgNode::type(), and QXmlStreamAttributes::value().

Referenced by findStyleFactoryMethod().

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

◆ createLineNode()

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

Definition at line 2791 of file qsvghandler.cpp.

References line, parent, toDouble(), and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createPathNode()

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

Definition at line 2937 of file qsvghandler.cpp.

References parent, parsePathDataFast(), qCWarning, QPainterPath::setFillRule(), QXmlStreamAttributes::value(), and Qt::WindingFill.

Referenced by findGraphicsFactory().

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

◆ createPolygonNode()

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

Definition at line 2952 of file qsvghandler.cpp.

References QString::constData(), i, parent, parseNumbersList(), QList< T >::size(), QStringView::toString(), and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createPolylineNode()

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

Definition at line 2968 of file qsvghandler.cpp.

References QString::constData(), i, line, parent, parseNumbersList(), QList< T >::size(), QStringView::toString(), and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createRadialGradientNode()

static QSvgStyleProperty * createRadialGradientNode ( QSvgNode node,
const QXmlStreamAttributes attributes,
QSvgHandler handler 
)
static

Definition at line 2993 of file qsvghandler.cpp.

References QGradient::ComponentInterpolation, QStringView::isEmpty(), parseBaseGradient(), QGradient::setInterpolationMode(), toDouble(), and QXmlStreamAttributes::value().

Referenced by findStyleFactoryMethod().

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

◆ createRectNode()

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

Definition at line 3032 of file qsvghandler.cpp.

References convertToPixels(), QRectF::height(), QRectF::isEmpty(), ok, parent, parseLength(), rect, rx(), ry(), toDouble(), QXmlStreamAttributes::value(), and QRectF::width().

Referenced by findGraphicsFactory().

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

◆ createSolidColorNode()

static QSvgStyleProperty * createSolidColorNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler handler 
)
static

Definition at line 3101 of file qsvghandler.cpp.

References constructColor(), QStringView::isEmpty(), parent, Q_UNUSED, and QXmlStreamAttributes::value().

Referenced by findStyleFactoryMethod().

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

◆ createSvgGlyph()

static bool createSvgGlyph ( QSvgFont font,
const QXmlStreamAttributes attributes 
)
static

Definition at line 913 of file qsvghandler.cpp.

References QStringView::at(), font, QStringView::isEmpty(), parsePathDataFast(), toDouble(), QXmlStreamAttributes::value(), and Qt::WindingFill.

Referenced by parseGlyphNode(), and parseMissingGlyphNode().

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

◆ createSvgNode()

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

Definition at line 3221 of file qsvghandler.cpp.

References convertToPixels(), QString::isEmpty(), QStringView::isEmpty(), QSvgHandler::LT_PERCENT, QSvgHandler::LT_PT, QSvgHandler::LT_PX, parent, parseLength(), Q_UNUSED, QString::replace(), QSvgHandler::setDefaultCoordinateSystem(), QSvgTinyDocument::setHeight(), QSvgTinyDocument::setViewBox(), QSvgTinyDocument::setWidth(), Qt::SkipEmptyParts, QString::split(), QStringView::toString(), and QXmlStreamAttributes::value().

Referenced by findGroupFactory().

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

◆ createSwitchNode()

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

Definition at line 3282 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findGroupFactory().

+ Here is the caller graph for this function:

◆ createTextAreaNode()

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

Definition at line 3318 of file qsvghandler.cpp.

References createTextNode(), parent, parseLength(), QSvgText::setTextArea(), and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createTextNode()

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

Definition at line 3301 of file qsvghandler.cpp.

References convertToPixels(), parent, parseLength(), text, and QXmlStreamAttributes::value().

Referenced by createTextAreaNode(), and findGraphicsFactory().

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

◆ createTspanNode()

static QSvgNode * createTspanNode ( QSvgNode parent,
const QXmlStreamAttributes ,
QSvgHandler  
)
static

Definition at line 3332 of file qsvghandler.cpp.

References parent.

Referenced by findGraphicsFactory().

+ Here is the caller graph for this function:

◆ createUseNode()

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

Definition at line 3347 of file qsvghandler.cpp.

References convertToPixels(), QSvgNode::DEFS, QSvgNode::DOC, QSvgNode::G, QString::isEmpty(), QStringView::isNull(), parent, parseLength(), qCWarning, qPrintable, QString::remove(), QSvgNode::SWITCH, QStringView::toString(), and QXmlStreamAttributes::value().

Referenced by findGraphicsFactory().

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

◆ createVideoNode()

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

Definition at line 3397 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findGraphicsFactory().

+ Here is the caller graph for this function:

◆ cssStyleLookup()

static void cssStyleLookup ( QSvgNode node,
QSvgHandler handler,
QSvgStyleSelector selector 
)
static

Definition at line 2016 of file qsvghandler.cpp.

References parseCSStoXMLAttrs(), parseStyle(), QCss::StyleSelector::NodePtr::ptr, and selector.

Referenced by QSvgHandler::startElement().

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

◆ displayStringToEnum()

◆ findGraphicsFactory()

static FactoryMethod findGraphicsFactory ( const QString name)
static

Definition at line 3430 of file qsvghandler.cpp.

References createAnimationNode(), createCircleNode(), createEllipseNode(), createImageNode(), createLineNode(), createPathNode(), createPolygonNode(), createPolylineNode(), createRectNode(), createTextAreaNode(), createTextNode(), createTspanNode(), createUseNode(), createVideoNode(), and QStringView::mid().

Referenced by QSvgHandler::startElement().

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

◆ findGroupFactory()

static FactoryMethod findGroupFactory ( const QString name)
static

Definition at line 3407 of file qsvghandler.cpp.

References createDefsNode(), createGNode(), createSvgNode(), createSwitchNode(), and QStringView::mid().

Referenced by QSvgHandler::startElement().

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

◆ findStyleFactoryMethod()

static StyleFactoryMethod findStyleFactoryMethod ( const QString name)
static

Definition at line 3531 of file qsvghandler.cpp.

References createFontNode(), createLinearGradientNode(), createRadialGradientNode(), createSolidColorNode(), and QStringView::mid().

Referenced by QSvgHandler::startElement().

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

◆ findStyleUtilFactoryMethod()

static StyleParseMethod findStyleUtilFactoryMethod ( const QString name)
static

Definition at line 3560 of file qsvghandler.cpp.

References QStringView::mid(), parseFontFaceNameNode(), parseFontFaceNode(), parseFontFaceSrcNode(), parseFontFaceUriNode(), parseGlyphNode(), parseMissingGlyphNode(), and parseStopNode().

Referenced by QSvgHandler::startElement().

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

◆ findUtilFactory()

static ParseMethod findUtilFactory ( const QString name)
static

Definition at line 3479 of file qsvghandler.cpp.

References QStringView::mid(), parseAimateMotionNode(), parseAnchorNode(), parseAnimateColorNode(), parseAnimateNode(), parseAnimateTransformNode(), parseAudioNode(), parseDescNode(), parseDiscardNode(), parseForeignObjectNode(), parseHandlerNode(), parseHkernNode(), parseMetadataNode(), parseMpathNode(), parsePrefetchNode(), parseScriptNode(), parseSetNode(), parseStyleNode(), parseTbreakNode(), and parseTitleNode().

Referenced by QSvgHandler::startElement().

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

◆ fontSizeSpec()

static FontSizeSpec fontSizeSpec ( QStringView  spec)
static

Definition at line 1262 of file qsvghandler.cpp.

References QStringView::at(), FontSizeNone, FontSizeValue, Large, Medium, Small, QChar::unicode(), XLarge, XSmall, XXLarge, and XXSmall.

Referenced by parseFont().

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

◆ idFromUrl()

static QString idFromUrl ( const QString url)
static

Definition at line 754 of file qsvghandler.cpp.

References QChar::isSpace(), and url.

Referenced by parseBrush(), parsePen(), and styleFromUrl().

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

◆ isDigit()

static bool isDigit ( ushort  ch)
inlinestatic

Definition at line 569 of file qsvghandler.cpp.

References ch, and magic.

Referenced by parseNumbersArray(), parseNumbersList(), and toDouble().

+ Here is the caller graph for this function:

◆ msgCouldNotResolveProperty()

static QByteArray msgCouldNotResolveProperty ( const QString id,
const QXmlStreamReader *  r 
)
inlinestatic

Definition at line 66 of file qsvghandler.cpp.

References prefixMessage(), QByteArrayLiteral, and toLocal8Bit().

+ Here is the call graph for this function:

◆ msgProblemParsing()

static QByteArray msgProblemParsing ( const QString localName,
const QXmlStreamReader *  r 
)
inlinestatic

Definition at line 61 of file qsvghandler.cpp.

References prefixMessage(), QByteArrayLiteral, and QString::toLocal8Bit().

Referenced by QSvgHandler::startElement().

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

◆ parseAimateMotionNode()

static bool parseAimateMotionNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2394 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseAnchorNode()

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

Definition at line 2304 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseAnimateColorNode()

static bool parseAnimateColorNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler handler 
)
static

Definition at line 2341 of file qsvghandler.cpp.

References begin(), colors, QString::constBegin(), QString::constEnd(), QString::isEmpty(), ok, parent, parseClockValue(), resolveColor(), QSvgHandler::setAnimPeriod(), QSvgAnimateColor::setArgs(), QSvgAnimateColor::setFreeze(), QSvgAnimateColor::setRepeatCount(), QString::size(), someId(), QString::split(), str, toDouble(), QStringView::toString(), and QXmlStreamAttributes::value().

Referenced by findUtilFactory().

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

◆ parseAnimateNode()

static bool parseAnimateNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2312 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseAnimateTransformNode()

static bool parseAnimateTransformNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler handler 
)
static

Definition at line 2410 of file qsvghandler.cpp.

References QList< T >::append(), begin(), QString::constData(), QSvgAnimateTransform::Empty, i, QString::isEmpty(), ok, parent, parseClockValue(), parseNumberTriplet(), QSvgAnimateTransform::Replace, QSvgAnimateTransform::Rotate, QSvgAnimateTransform::Scale, QSvgHandler::setAnimPeriod(), QSvgAnimateTransform::setArgs(), QSvgAnimateTransform::setFreeze(), QSvgAnimateTransform::setRepeatCount(), QList< T >::size(), QSvgAnimateTransform::SkewX, QSvgAnimateTransform::SkewY, someId(), QSvgAnimateTransform::Sum, toDouble(), QStringView::toString(), QSvgAnimateTransform::Translate, typeStr(), and QXmlStreamAttributes::value().

Referenced by findUtilFactory().

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

◆ parseAudioNode()

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

Definition at line 2515 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseBaseGradient()

◆ parseBrush()

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

◆ parseClockValue()

static int parseClockValue ( QStringView  str,
bool *  ok 
)
static

Definition at line 2320 of file qsvghandler.cpp.

References QString::chop(), QString::endsWith(), ok, str, toDouble(), and QString::trimmed().

Referenced by parseAnimateColorNode(), and parseAnimateTransformNode().

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

◆ parseColor()

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

Definition at line 962 of file qsvghandler.cpp.

References QSvgAttributes::color, QSvgAttributes::colorOpacity, constructColor(), QSvgHandler::popColor(), and QSvgHandler::pushColor().

Referenced by parseStyle().

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

◆ parseCompOp()

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

Definition at line 2164 of file qsvghandler.cpp.

References QSvgNode::appendStyleProperty(), QSvgAttributes::compOp, QSvgAttributes::id, QStringView::isEmpty(), svgToQtCompositionMode(), QStringView::toString(), and QString::trimmed().

Referenced by parseStyle().

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

◆ parseCoreNode()

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

Definition at line 2037 of file qsvghandler.cpp.

References QList< T >::at(), i, QSvgNode::setNodeId(), QSvgNode::setRequiredExtensions(), QSvgNode::setRequiredFeatures(), QSvgNode::setRequiredFonts(), QSvgNode::setRequiredFormats(), QSvgNode::setRequiredLanguages(), QSvgNode::setXmlClass(), QList< T >::size(), someId(), and stringToList().

Referenced by QSvgHandler::startElement().

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

◆ parseCSStoXMLAttrs()

static void parseCSStoXMLAttrs ( const QList< QCss::Declaration > &  declarations,
QXmlStreamAttributes attributes 
)
static

Definition at line 1898 of file qsvghandler.cpp.

References QXmlStreamAttributes::append(), QString::append(), QList< T >::at(), QCss::Declaration::d, QCss::Value::Function, i, QCss::Value::KnownIdentifier, QString::prepend(), QList< T >::size(), QCss::Value::Uri, and QCss::Value_None.

Referenced by cssStyleLookup().

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

◆ parseDescNode()

static bool parseDescNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2550 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseDiscardNode()

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

Definition at line 2558 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseFont()

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

◆ parseFontFaceNameNode()

static bool parseFontFaceNameNode ( QSvgStyleProperty parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2638 of file qsvghandler.cpp.

References QSvgTinyDocument::addSvgFont(), QSvgFontStyle::doc(), font, QSvgStyleProperty::FONT, parent, QSvgFontStyle::svgFont(), QSvgTinyDocument::svgFont(), toString(), and QXmlStreamAttributes::value().

Referenced by findStyleUtilFactoryMethod().

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

◆ parseFontFaceNode()

static bool parseFontFaceNode ( QSvgStyleProperty parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2610 of file qsvghandler.cpp.

References QSvgTinyDocument::addSvgFont(), QSvgFont::DEFAULT_UNITS_PER_EM, QSvgFontStyle::doc(), font, QSvgStyleProperty::FONT, parent, QSvgFontStyle::svgFont(), QSvgTinyDocument::svgFont(), toDouble(), toString(), and QXmlStreamAttributes::value().

Referenced by findStyleUtilFactoryMethod().

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

◆ parseFontFaceSrcNode()

static bool parseFontFaceSrcNode ( QSvgStyleProperty parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2660 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findStyleUtilFactoryMethod().

+ Here is the caller graph for this function:

◆ parseFontFaceUriNode()

static bool parseFontFaceUriNode ( QSvgStyleProperty parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2668 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findStyleUtilFactoryMethod().

+ Here is the caller graph for this function:

◆ parseForeignObjectNode()

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

Definition at line 2676 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseGlyphNode()

static bool parseGlyphNode ( QSvgStyleProperty parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2693 of file qsvghandler.cpp.

References createSvgGlyph(), font, QSvgStyleProperty::FONT, parent, and QSvgFontStyle::svgFont().

Referenced by findStyleUtilFactoryMethod().

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

◆ parseHandlerNode()

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

Definition at line 2707 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseHkernNode()

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

Definition at line 2715 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseLength()

static qreal parseLength ( QStringView  str,
QSvgHandler::LengthType type,
QSvgHandler handler,
bool *  ok = NULL 
)
static

Definition at line 868 of file qsvghandler.cpp.

References QStringView::chop(), QSvgHandler::defaultCoordinateSystem(), QStringView::endsWith(), QSvgHandler::LT_CM, QSvgHandler::LT_IN, QSvgHandler::LT_MM, QSvgHandler::LT_PC, QSvgHandler::LT_PERCENT, QSvgHandler::LT_PT, QSvgHandler::LT_PX, ok, str, toDouble(), and QString::trimmed().

Referenced by convertToNumber(), createImageNode(), createRectNode(), createSvgNode(), createTextAreaNode(), createTextNode(), createUseNode(), parseFont(), and parsePen().

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

◆ parseMetadataNode()

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

Definition at line 2907 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseMissingGlyphNode()

static bool parseMissingGlyphNode ( QSvgStyleProperty parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 2915 of file qsvghandler.cpp.

References createSvgGlyph(), font, QSvgStyleProperty::FONT, parent, and QSvgFontStyle::svgFont().

Referenced by findStyleUtilFactoryMethod().

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

◆ parseMpathNode()

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

Definition at line 2929 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseNumbersArray()

static void parseNumbersArray ( const QChar *&  str,
QVarLengthArray< qreal, 8 > &  points,
const char *  pattern = nullptr 
)
inlinestatic

Definition at line 692 of file qsvghandler.cpp.

References QString::append(), isDigit(), qstrlen(), str, toDouble(), and QString::unicode().

Referenced by parsePathDataFast(), and parseTransformationMatrix().

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

◆ parseNumbersList()

static QList< qreal > parseNumbersList ( const QChar *&  str)
static

Definition at line 664 of file qsvghandler.cpp.

References QString::append(), isDigit(), str, toDouble(), and QString::unicode().

Referenced by createPolygonNode(), createPolylineNode(), parseNumberTriplet(), parsePen(), and resolveColor().

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

◆ parseNumberTriplet()

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

Definition at line 2402 of file qsvghandler.cpp.

References QList< T >::append(), i, list, parseNumbersList(), and QList< T >::size().

Referenced by parseAnimateTransformNode().

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

◆ parseOpacity()

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

Definition at line 2088 of file qsvghandler.cpp.

References QSvgNode::appendStyleProperty(), QSvgAttributes::id, QStringView::isEmpty(), ok, QSvgAttributes::opacity, qBound(), and QStringView::trimmed().

Referenced by parseStyle().

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

◆ parseOthers()

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

Definition at line 2220 of file qsvghandler.cpp.

References QSvgAttributes::display, displayStringToEnum(), QString::isEmpty(), QStringView::isEmpty(), QSvgNode::setDisplayMode(), QStringView::toString(), and QString::trimmed().

Referenced by parseStyle().

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

◆ parsePathDataFast()

static bool parsePathDataFast ( QStringView  data,
QPainterPath path 
)
static

Definition at line 1560 of file qsvghandler.cpp.

References arg, c2, QStringView::constData(), e, ok, parseNumbersArray(), pathArc(), rx(), ry(), QStringView::size(), str, QChar::toLatin1(), QChar::unicode(), QPointF::x(), and QPointF::y().

Referenced by createPathNode(), and createSvgGlyph().

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

◆ parsePen()

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

Definition at line 1155 of file qsvghandler.cpp.

References QSvgNode::appendStyleProperty(), Qt::BevelJoin, Qt::FlatCap, QSvgStyleProperty::GRADIENT, QSvgAttributes::id, idFromUrl(), QStringView::isEmpty(), QStringView::mid(), Qt::NoBrush, parseLength(), parseNumbersList(), qMax(), qMin(), QT_INHERIT, resolveColor(), Qt::RoundCap, Qt::RoundJoin, QSvgStrokeStyle::setDashArray(), QSvgStrokeStyle::setDashArrayNone(), QSvgStrokeStyle::setDashOffset(), QSvgStrokeStyle::setGradientId(), QSvgStrokeStyle::setGradientResolved(), QSvgStrokeStyle::setLineCap(), QSvgStrokeStyle::setLineJoin(), QSvgStrokeStyle::setMiterLimit(), QSvgStrokeStyle::setOpacity(), QSvgStrokeStyle::setStroke(), QSvgStrokeStyle::setStyle(), QSvgStrokeStyle::setVectorEffect(), QSvgStrokeStyle::setWidth(), QStringView::size(), QList< T >::size(), QSvgStyleProperty::SOLID_COLOR, Qt::SquareCap, QSvgAttributes::stroke, QSvgAttributes::strokeDashArray, QSvgAttributes::strokeDashOffset, QSvgAttributes::strokeLineCap, QSvgAttributes::strokeLineJoin, QSvgAttributes::strokeMiterLimit, QSvgAttributes::strokeOpacity, QSvgAttributes::strokeWidth, styleFromUrl(), Qt::SvgMiterJoin, toDouble(), QStringView::toString(), QSvgStyleProperty::type(), and QSvgAttributes::vectorEffect.

Referenced by parseStyle().

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

◆ parsePercentageList()

static QList< qreal > parsePercentageList ( const QChar *&  str)
static

Definition at line 723 of file qsvghandler.cpp.

References QString::append(), str, and toDouble().

Referenced by resolveColor().

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

◆ parsePrefetchNode()

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

Definition at line 2985 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseRenderingHints()

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

Definition at line 2233 of file qsvghandler.cpp.

References QSvgNode::appendStyleProperty(), QSvgAttributes::id, QSvgAttributes::imageRendering, QSvgQualityStyle::ImageRenderingAuto, QSvgQualityStyle::ImageRenderingOptimizeQuality, QSvgQualityStyle::ImageRenderingOptimizeSpeed, QStringView::isEmpty(), QStringView::toString(), and QString::trimmed().

Referenced by parseStyle().

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

◆ parseScriptNode()

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

Definition at line 3085 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseSetNode()

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

Definition at line 3093 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseStopNode()

static bool parseStopNode ( QSvgStyleProperty parent,
const QXmlStreamAttributes attributes,
QSvgHandler handler 
)
static

◆ parseStyle() [1/2]

static bool parseStyle ( QSvgNode node,
const QSvgAttributes attributes,
QSvgHandler handler 
)
static

Definition at line 2252 of file qsvghandler.cpp.

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

+ Here is the call graph for this function:

◆ parseStyle() [2/2]

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

Definition at line 2297 of file qsvghandler.cpp.

References attrs, and parseStyle().

Referenced by cssStyleLookup(), parseStyle(), and QSvgHandler::startElement().

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

◆ parseStyleNode()

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

Definition at line 3204 of file qsvghandler.cpp.

References Qt::CaseInsensitive, parent, Q_UNUSED, QSvgHandler::setInStyle(), and QXmlStreamAttributes::value().

Referenced by findUtilFactory().

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

◆ parseTbreakNode()

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

Definition at line 3291 of file qsvghandler.cpp.

References parent, and QSvgNode::TEXTAREA.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseTitleNode()

static bool parseTitleNode ( QSvgNode parent,
const QXmlStreamAttributes attributes,
QSvgHandler  
)
static

Definition at line 3339 of file qsvghandler.cpp.

References parent, and Q_UNUSED.

Referenced by findUtilFactory().

+ Here is the caller graph for this function:

◆ parseTransform()

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

Definition at line 1387 of file qsvghandler.cpp.

References QSvgNode::appendStyleProperty(), QSvgAttributes::id, QStringView::isEmpty(), parseTransformationMatrix(), QSvgAttributes::transform, and QStringView::trimmed().

Referenced by parseStyle().

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

◆ parseTransformationMatrix()

static QTransform parseTransformationMatrix ( QStringView  value)
static

Definition at line 1025 of file qsvghandler.cpp.

References QString::constData(), error, i, ident, parseNumbersArray(), qDegreesToRadians(), qTan(), QString::size(), state, and str.

Referenced by parseBaseGradient(), and parseTransform().

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

◆ parseVisibility()

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

Definition at line 1401 of file qsvghandler.cpp.

References QStringView::isEmpty(), parent, QSvgNode::parent(), QT_INHERIT, QSvgNode::setVisible(), and QSvgAttributes::visibility.

Referenced by parseStyle().

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

◆ pathArc()

static void pathArc ( QPainterPath path,
qreal  rx,
qreal  ry,
qreal  x_axis_rotation,
int  large_arc_flag,
int  sweep_flag,
qreal  x,
qreal  y,
qreal  curx,
qreal  cury 
)
static

Definition at line 1474 of file qsvghandler.cpp.

References d, i, pathArcSegment(), Q_PI, qAbs(), qAtan2(), qCeil(), qCos(), qSin(), qSqrt(), rx(), and ry().

Referenced by QQuickSvgParser::parsePathDataFast(), and parsePathDataFast().

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

◆ pathArcSegment()

static void pathArcSegment ( QPainterPath path,
qreal  xc,
qreal  yc,
qreal  th0,
qreal  th1,
qreal  rx,
qreal  ry,
qreal  xAxisRotation 
)
static

Definition at line 1415 of file qsvghandler.cpp.

References Q_PI, qCos(), qSin(), rx(), and ry().

Referenced by pathArc().

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

◆ prefixMessage()

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

Definition at line 41 of file qsvghandler.cpp.

References QFile::encodeName(), file, QFile::fileName(), QByteArray::number(), QByteArrayLiteral, and QDir::toNativeSeparators().

Referenced by msgCouldNotResolveProperty(), msgProblemParsing(), and QSvgHandler::startElement().

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

◆ 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 97 of file qsvghandler.cpp.

References ok, qRgb(), qstrlen(), qsvg_hex2int(), and rgb.

Referenced by qsvg_get_hex_rgb(), and resolveColor().

+ Here is the call graph for this function:
+ Here is the caller 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 132 of file qsvghandler.cpp.

References i, qsvg_get_hex_rgb(), rgb, and str.

+ Here is the call graph for this function:

◆ qsvg_h2i()

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

Definition at line 73 of file qsvghandler.cpp.

References hex, and ok.

Referenced by qsvg_hex2int(), and qsvg_hex2int().

+ Here is the caller graph for this function:

◆ qsvg_hex2int() [1/2]

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

Definition at line 91 of file qsvghandler.cpp.

References ok, and qsvg_h2i().

+ Here is the call graph for this function:

◆ qsvg_hex2int() [2/2]

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

Definition at line 86 of file qsvghandler.cpp.

References ok, and 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()

static bool resolveColor ( QStringView  colorStr,
QColor color,
QSvgHandler handler 
)
static

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

Definition at line 788 of file qsvghandler.cpp.

References QStringView::at(), QStringView::constData(), QSvgHandler::currentColor(), QColor::fromString(), i, QStringView::isEmpty(), QStringView::mid(), ok, parseNumbersList(), parsePercentageList(), QRgb, qsvg_get_hex_rgb(), QT_INHERIT, rgb, QStringView::size(), QList< T >::size(), QStringView::toString(), QStringView::trimmed(), and QChar::unicode().

Referenced by constructColor(), parseAnimateColorNode(), parseBrush(), and parsePen().

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

◆ someId()

static QString someId ( const QXmlStreamAttributes attributes)
inlinestatic

Definition at line 147 of file qsvghandler.cpp.

References QStringView::toString(), and QXmlStreamAttributes::value().

Referenced by createFontNode(), parseAnimateColorNode(), parseAnimateTransformNode(), parseCoreNode(), parseStopNode(), and QSvgHandler::startElement().

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

◆ stringToList()

static QStringList stringToList ( const QString str)
inlinestatic

Definition at line 2031 of file qsvghandler.cpp.

References Qt::SkipEmptyParts, QString::split(), and str.

Referenced by parseCoreNode().

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

◆ styleFromUrl()

static QSvgStyleProperty * styleFromUrl ( QSvgNode node,
const QString url 
)
static

Definition at line 973 of file qsvghandler.cpp.

References idFromUrl(), QSvgNode::styleProperty(), and url.

Referenced by parseBrush(), and parsePen().

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

◆ svgToQtCompositionMode()

◆ toDouble() [1/2]

static qreal toDouble ( const QChar *&  str)
static

Definition at line 575 of file qsvghandler.cpp.

References QByteArray::fromRawData(), isDigit(), pos, qFpClassify(), str, QByteArray::toDouble(), QString::toLatin1(), and QString::unicode().

Referenced by constructColor(), createCircleNode(), createEllipseNode(), createFontNode(), createImageNode(), createLineNode(), createRadialGradientNode(), createRectNode(), createSvgGlyph(), parseAnimateColorNode(), parseAnimateTransformNode(), parseBrush(), parseClockValue(), parseFontFaceNode(), parseLength(), parseNumbersArray(), parseNumbersList(), parsePen(), parsePercentageList(), and toDouble().

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

◆ toDouble() [2/2]

static qreal toDouble ( QStringView  str,
bool *  ok = NULL 
)
static

Definition at line 655 of file qsvghandler.cpp.

References QString::constData(), ok, QString::size(), str, and toDouble().

+ Here is the call graph for this function:

Variable Documentation

◆ QSvgStyleSelector_nodeString

const char* QSvgStyleSelector_nodeString[]
static
Initial value:
= {
"svg",
"g",
"defs",
"switch",
"animation",
"arc",
"circle",
"ellipse",
"image",
"line",
"path",
"polygon",
"polyline",
"rect",
"text",
"textarea",
"tspan",
"use",
"video"
}

Definition at line 413 of file qsvghandler.cpp.

Referenced by QSvgStyleSelector::nodeToName().

◆ qt_inherit_text

QT_BEGIN_NAMESPACE const char* qt_inherit_text = "inherit"
static

Definition at line 38 of file qsvghandler.cpp.

◆ 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:92

Definition at line 1257 of file qsvghandler.cpp.

Referenced by parseFont().

◆ unfinishedElementsLimit

const int unfinishedElementsLimit = 2048
static

Definition at line 3619 of file qsvghandler.cpp.