4#include "qplatformdefs.h"
29#include "private/qmath_p.h"
39#define QT_INHERIT QLatin1String(qt_inherit_text)
45 if (
const QFile *
file = qobject_cast<const QFile *>(
r->device()))
75 if (
hex >=
'0' &&
hex <=
'9')
77 if (
hex >=
'a' &&
hex <=
'f')
78 return hex -
'a' + 10;
79 if (
hex >=
'A' &&
hex <=
'F')
80 return hex -
'A' + 10;
109 }
else if (
len == 9) {
113 }
else if (
len == 6) {
117 }
else if (
len == 3) {
137 for(
int i = 0;
i <
len; ++
i)
138 tmp[
i] =
str[
i].toLatin1();
191#ifndef QT_NO_CSSPARSER
198 for (
int i = 0;
i < xmlAttributes.
size(); ++
i) {
205 switch (
name.at(0).unicode()) {
242 id =
value.toString();
295 id =
value.toString();
305#ifndef QT_NO_CSSPARSER
316 switch (
name.at(0).unicode()) {
411#ifndef QT_NO_CSSPARSER
490 return n->xmlClass();
497 (!
n->nodeId().isEmpty() || !
n->xmlClass().isEmpty()));
532 newNode.
ptr = svgParent;
572 return ((
ch >> 4) == 3) && (
magic >> (
ch & 15));
577 const int maxLen = 255;
619 const char *
t = temp;
625 while(*
t && *
t !=
'.') {
671 while (
str->isSpace())
679 while (
str->isSpace())
685 while (
str->isSpace())
696 while (
str->isSpace())
702 if (patternLen &&
pattern[
points.size() % patternLen] ==
'f') {
712 while (
str->isSpace())
718 while (
str->isSpace())
729 while (
str->isSpace())
737 while (
str->isSpace())
741 while (
str->isSpace())
747 while (
str->isSpace())
817 if (compo.
size() == 1) {
820 for (
int i = 0;
i < compo.
size(); ++
i)
824 if (compo.
size() == 3) {
850 return color.isValid();
925 font->addGlyph(unicode,
path, havx);
946 return len * 3.543307;
949 return len * 35.43307;
1027 if (
value.isEmpty())
1049 const char *
ident =
"atrix";
1050 for (
int i = 0;
i < 5; ++
i)
1056 const char *
ident =
"ranslate";
1057 for (
int i = 0;
i < 8; ++
i)
1063 const char *
ident =
"otate";
1064 for (
int i = 0;
i < 5; ++
i)
1072 const char *
ident =
"ale";
1073 for (
int i = 0;
i < 3; ++
i)
1099 while (str < end && str->isSpace())
1110 if(
state == Matrix) {
1116 }
else if (
state == Translate) {
1119 else if (
points.size() == 2)
1123 }
else if (
state == Rotate) {
1126 }
else if (
points.size() == 3) {
1133 }
else if (
state == Scale) {
1141 }
else if (
state == SkewX) {
1145 }
else if (
state == SkewY) {
1204 if ((dashes.
size() & 1) != 0)
1205 dashes << QList<qreal>(dashes);
1317 family = family.
mid(1, family.
size() - 2);
1395 if (!
matrix.isIdentity()) {
1421 qreal a00, a01, a10, a11;
1426 sinTh =
qSin(xAxisRotation * (
Q_PI / 180.0));
1427 cosTh =
qCos(xAxisRotation * (
Q_PI / 180.0));
1434 thHalf = 0.5 * (th1 - th0);
1435 t = (8.0 / 3.0) *
qSin(thHalf * 0.5) *
qSin(thHalf * 0.5) /
qSin(thHalf);
1438 x3 = xc +
qCos(th1);
1439 y3 = yc +
qSin(th1);
1444 a00 *
x2 + a01 *
y2, a10 *
x2 + a11 *
y2,
1445 a00 * x3 + a01 * y3, a10 * x3 + a11 * y3);
1477 qreal x_axis_rotation,
1490 qreal sin_th, cos_th;
1491 qreal a00, a01, a10, a11;
1493 qreal d, sfactor, sfactor_sq;
1494 qreal th0, th1, th_arc;
1496 qreal dx, dy, dx1, dy1, Px, Py, check;
1501 sin_th =
qSin(x_axis_rotation * (
Q_PI / 180.0));
1502 cos_th =
qCos(x_axis_rotation * (
Q_PI / 180.0));
1504 dx = (curx -
x) / 2.0;
1505 dy = (cury -
y) / 2.0;
1506 dx1 = cos_th * dx + sin_th * dy;
1507 dy1 = -sin_th * dx + cos_th * dy;
1511 check = Px / Pr1 + Py / Pr2;
1521 x0 = a00 * curx + a01 * cury;
1522 y0 = a10 * curx + a11 * cury;
1523 x1 = a00 *
x + a01 *
y;
1524 y1 = a10 *
x + a11 *
y;
1533 sfactor_sq = 1.0 /
d - 0.25;
1534 if (sfactor_sq < 0) sfactor_sq = 0;
1535 sfactor =
qSqrt(sfactor_sq);
1536 if (sweep_flag == large_arc_flag) sfactor = -sfactor;
1537 xc = 0.5 * (
x0 +
x1) - sfactor * (
y1 -
y0);
1538 yc = 0.5 * (
y0 +
y1) + sfactor * (
x1 -
x0);
1545 if (th_arc < 0 && sweep_flag)
1547 else if (th_arc > 0 && !sweep_flag)
1552 for (
i = 0;
i < n_segs;
i++) {
1554 th0 +
i * th_arc / n_segs,
1555 th0 + (
i + 1) * th_arc / n_segs,
1556 rx,
ry, x_axis_rotation);
1562 const int maxElementCount = 0x7fff;
1572 while (
str->isSpace() && (
str + 1) !=
end)
1578 const char *
pattern =
nullptr;
1597 x =
x0 =
num[0] + offsetX;
1598 y =
y0 =
num[1] + offsetY;
1632 path.closeSubpath();
1640 x =
num[0] + offsetX;
1641 y =
num[1] + offsetY;
1661 x =
num[0] + offsetX;
1675 y =
num[0] + offsetY;
1726 if (lastMode ==
'c' || lastMode ==
'C' ||
1727 lastMode ==
's' || lastMode ==
'S')
1747 if (lastMode ==
'c' || lastMode ==
'C' ||
1748 lastMode ==
's' || lastMode ==
'S')
1801 if (lastMode ==
'q' || lastMode ==
'Q' ||
1802 lastMode ==
't' || lastMode ==
'T')
1821 if (lastMode ==
'q' || lastMode ==
'Q' ||
1822 lastMode ==
't' || lastMode ==
'T')
1848 int(sweepFlag), ex, ey, curx, cury);
1870 int(sweepFlag), ex, ey, curx, cury);
1881 if (
path.elementCount() > maxElementCount)
1896#ifndef QT_NO_CSSPARSER
1901 for (
int i = 0;
i < declarations.
size(); ++
i) {
1903 if (decl.
d->property.isEmpty())
1907 const int valCount = decl.
d->values.size();
1908 if (valCount != 1) {
1909 for (
int i = 0;
i < valCount; ++
i) {
1910 valueStr += decl.
d->values[
i].toString();
1911 if (
i + 1 < valCount)
1915 valueStr =
val.toString();
1922 valueStr.
append(lst.at(0));
1924 for (
int i = 1;
i < lst.size(); ++
i) {
1926 if ((
i +1) < lst.size())
1931 switch (
val.variant.toInt()) {
1947 m_cssParser.
init(css);
1952 while (m_cssParser.
hasNext()) {
1979 const int firstSymbol = m_cssParser.
index;
1980 int symbolCount = 0;
1987 if (canExtractValueByRef) {
1989 for (
int i = firstSymbol + 1;
i < firstSymbol + symbolCount; ++
i) {
1994 canExtractValueByRef =
false;
1998 if (canExtractValueByRef) {
2003 if (!canExtractValueByRef) {
2005 for (
int i = firstSymbol;
i < m_cssParser.
index - 1; ++
i)
2047 for (
int i = 0;
i < attributes.
size(); ++
i) {
2053 switch (
name.at(0).unicode()) {
2056 xmlClassStr =
value.toString();
2108#define NOOP qDebug()<<"Operation: "<<op<<" is not implemented"
2172 if (!
value.isEmpty()) {
2258 parsePen(node, attributes, handler);
2268 value = attributes.value(
"audio-level");
2270 value = attributes.value(
"color-rendering");
2272 value = attributes.value(
"display-align");
2274 value = attributes.value(
"image-rendering");
2276 value = attributes.value(
"line-increment");
2278 value = attributes.value(
"pointer-events");
2280 value = attributes.value(
"shape-rendering");
2282 value = attributes.value(
"solid-color");
2284 value = attributes.value(
"solid-opacity");
2286 value = attributes.value(
"text-rendering");
2288 value = attributes.value(
"vector-effect");
2290 value = attributes.value(
"viewport-fill");
2292 value = attributes.value(
"viewport-fill-opacity");
2333 if (
val > std::numeric_limits<int>::min() &&
val < std::numeric_limits<int>::max())
2334 res =
static_cast<int>(
val);
2356 QColor startColor, endColor;
2360 colors.append(startColor);
2365 QStringList::const_iterator itr;
2389 parent->document()->setAnimated(
true);
2449 }
else if (!byStr.
isEmpty()) {
2453 for (
int i = vals.
size() - 3;
i < vals.
size(); ++
i)
2454 vals[
i] += vals[
i - 3];
2468 if (vals.
size() % 3 != 0)
2502 parent->document()->setAnimated(
true);
2602 font->setFamilyName(myId);
2627 if (!
name.isEmpty())
2629 font->setUnitsPerEm(unitsPerEm);
2631 if (!
font->familyName().isEmpty())
2650 if (!
name.isEmpty())
2653 if (!
font->familyName().isEmpty())
2741 filename = filename.
trimmed();
2743 qCWarning(lcSvgHandler) <<
"QSvgHandler: Image filename is empty";
2746 if (nwidth <= 0 || nheight <= 0) {
2747 qCWarning(lcSvgHandler) <<
"QSvgHandler: Width or height for" << filename <<
"image was not greater than 0";
2760 qCDebug(lcSvgHandler) <<
"QSvgHandler::createImageNode: Unrecognized inline image format!";
2763 const auto *
file = qobject_cast<QFile *>(handler->
device());
2774 if (
image.isNull()) {
2775 qCWarning(lcSvgHandler) <<
"Could not create image from" << filename;
2804 QLineF lineBounds(nx1, ny1, nx2, ny2);
2830 if (node && !link.
isEmpty()) {
2852 }
else if (!
matrix.isIdentity()) {
2946 qCWarning(lcSvgHandler,
"Invalid path data; path truncated.");
2962 for (
int i = 0;
i < poly.
size(); ++
i)
2978 for (
int i = 0;
i < poly.
size(); ++
i)
3060 if (!
rx.isEmpty() &&
ry.isEmpty())
3062 else if (!
ry.isEmpty() &&
rx.isEmpty())
3068 if (nrx > bounds.
width()/2)
3069 nrx = bounds.
width()/2;
3070 if (nry > bounds.
height()/2)
3076 nrx *= (100/(bounds.
width()/2));
3077 nry *= (100/(bounds.
height()/2));
3109 if (solidOpacityStr.
isEmpty())
3138#ifndef QT_NO_CSSPARSER
3140 cssNode.
ptr = &anim;
3143 for (
int i = 0;
i < decls.
size(); ++
i) {
3146 if (decl.
d->property.isEmpty())
3148 if (decl.
d->values.size() != 1)
3184 stops = grad->
stops();
3192 if ((stops.
size() == 1) || (stops.
at(stops.
size() - 2).first < 1.0 - FLT_EPSILON)) {
3193 stops.
back().first = 1.0 - FLT_EPSILON;
3209#ifdef QT_NO_CSSPARSER
3256 if (viewBoxValues.size() == 4) {
3257 QString xStr = viewBoxValues.at(0).trimmed();
3258 QString yStr = viewBoxValues.at(1).trimmed();
3259 QString widthStr = viewBoxValues.at(2).trimmed();
3260 QString heightStr = viewBoxValues.at(3).trimmed();
3358 switch (
parent->type()) {
3383 if (
parent->isDescendantOf(link))
3413 switch (
name.at(0).unicode()) {
3436 switch (
name.at(0).unicode()) {
3485 switch (
name.at(0).unicode()) {
3537 switch (
name.at(0).unicode()) {
3566 switch (
name.at(0).unicode()) {
3589 , m_ownsReader(true)
3595 , m_ownsReader(true)
3601 , m_ownsReader(
false)
3606void QSvgHandler::init()
3611 m_defaultCoords =
LT_PX;
3621void QSvgHandler::parse()
3623 xml->setNamespaceProcessing(
false);
3624#ifndef QT_NO_CSSPARSER
3630 while (!xml->atEnd() && !
done) {
3631 switch (xml->readNext()) {
3632 case QXmlStreamReader::StartElement:
3641 if (remainingUnfinishedElements
3642 &&
startElement(xml->name().toString(), xml->attributes())) {
3643 --remainingUnfinishedElements;
3650 case QXmlStreamReader::EndElement:
3652 ++remainingUnfinishedElements;
3655 case QXmlStreamReader::Characters:
3658 case QXmlStreamReader::ProcessingInstruction:
3659 processingInstruction(xml->processingInstructionTarget().toString(), xml->processingInstructionData().toString());
3665 resolveGradients(m_doc);
3689 +
"\" is an invalid value for attribute xml:space. "
3690 "Valid values are \"preserve\" and \"default\".";
3700 node =
method(m_doc ? m_nodes.
top() : 0, attributes,
this);
3706 switch (m_nodes.
top()->
type()) {
3727#ifndef QT_NO_CSSPARSER
3735 node =
method(m_nodes.
top(), attributes,
this);
3737 switch (m_nodes.
top()->
type()) {
3776#ifndef QT_NO_CSSPARSER
3781 static_cast<QSvgText *
>(node)->setWhitespaceMode(m_whitespaceMode.
top());
3783 static_cast<QSvgTspan *
>(node)->setWhitespaceMode(m_whitespaceMode.
top());
3785 auto useNode =
static_cast<QSvgUse *
>(node);
3786 if (!useNode->isResolved())
3787 m_toBeResolved.
append(useNode);
3793 if (!
method(m_nodes.
top(), attributes,
this))
3806 if (!
method(m_style, attributes,
this))
3811 m_skipNodes.
push(Unknown);
3817 m_skipNodes.
push(Graphics);
3820 m_skipNodes.
push(Style);
3827 CurrentNode node = m_skipNodes.
top();
3829 m_whitespaceMode.
pop();
3833 if (node == Unknown) {
3837#ifdef QT_NO_CSSPARSER
3844 if (node == Graphics)
3846 else if (m_style && !m_skipNodes.
isEmpty() && m_skipNodes.
top() != Style)
3852void QSvgHandler::resolveGradients(
QSvgNode *node,
int nestedDepth)
3864 if (
fill && !
fill->isGradientResolved()) {
3868 fill->setFillStyle(style);
3887 if (nestedDepth < 2048)
3888 resolveGradients(*
it, nestedDepth + 1);
3892void QSvgHandler::resolveNodes()
3894 for (
QSvgUse *useNode :
std::as_const(m_toBeResolved)) {
3895 const auto parent = useNode->parent();
3910 if (useNode->parent()->isDescendantOf(link))
3913 useNode->setLink(link);
3915 m_toBeResolved.
clear();
3920#ifndef QT_NO_CSSPARSER
3943 return xml->device();
3953 return m_defaultCoords;
3958 m_defaultCoords =
type;
3964 m_colorTagCount.
push(1);
3969 if (m_colorTagCount.
size())
3970 ++m_colorTagCount.
top();
3977 if (m_colorTagCount.
size()) {
3978 if (!--m_colorTagCount.
top()) {
3980 m_colorTagCount.
pop();
3988 return m_colorStack.
top();
3993#ifndef QT_NO_CSSPARSER
4014#ifdef QT_NO_CSSPARSER
4023 while (
iter.hasNext()) {
4061 m_animEnd =
qMax(
end, m_animEnd);
4071#ifndef QT_NO_CSSPARSER
IOBluetoothDevice * device
double toDouble(bool *ok=nullptr) const
Returns the byte array converted to a double value.
static QByteArray fromBase64(const QByteArray &base64, Base64Options options=Base64Encoding)
static QByteArray number(int, int base=10)
Returns a byte-array representing the whole number n as text.
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
constexpr char toLatin1() const noexcept
Returns the Latin-1 character equivalent to the QChar, or 0.
constexpr char16_t unicode() const noexcept
Returns the numeric Unicode value of the QChar.
constexpr bool isSpace() const noexcept
Returns true if the character is a separator character (Separator_* categories or certain code points...
The QColor class provides colors based on RGB, HSV or CMYK values.
static QColor fromString(QAnyStringView name) noexcept
void init(const QString &css, bool file=false)
bool parse(StyleSheet *styleSheet, Qt::CaseSensitivity nameCaseSensitivity=Qt::CaseSensitive)
const Symbol & symbol() const
QList< StyleSheet > styleSheets
Qt::CaseSensitivity nameCaseSensitivity
QList< Declaration > declarationsForNode(NodePtr node, const char *extraPseudo=nullptr)
static QString toNativeSeparators(const QString &pathName)
QString absoluteFilePath(const QString &fileName) const
Returns the absolute path name of a file in the directory.
\inmodule QtCore \reentrant
QString absoluteFilePath() const
Returns an absolute path including the file name.
QDir absoluteDir() const
Returns the file's absolute path as a QDir object.
bool exists() const
Returns true if the file exists; otherwise returns false.
bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
static QByteArray encodeName(const QString &fileName)
Converts fileName to an 8-bit encoding that you can use in native APIs.
QString fileName() const override
Returns the name set by setFileName() or to the QFile constructors.
void setSpread(Spread spread)
Specifies the spread method that should be used for this gradient.
void setCoordinateMode(CoordinateMode mode)
void setStops(const QGradientStops &stops)
Replaces the current set of stop points with the given stopPoints.
void setColorAt(qreal pos, const QColor &color)
Creates a stop point at the given position with the given color.
void setInterpolationMode(InterpolationMode mode)
QGradientStops stops() const
Returns the stop points for this gradient.
\inmodule QtCore \reentrant
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
@ Format_ARGB32_Premultiplied
static QImage fromData(QByteArrayView data, const char *format=nullptr)
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
void reserve(qsizetype size)
void append(parameter_type t)
void setFillRule(Qt::FillRule fillRule)
Sets the fill rule of the painter path to the given fillRule.
CompositionMode
Defines the modes supported for digital image compositing.
@ CompositionMode_Destination
@ CompositionMode_Lighten
@ CompositionMode_ColorDodge
@ CompositionMode_DestinationAtop
@ CompositionMode_SourceOver
@ CompositionMode_DestinationOut
@ CompositionMode_SourceAtop
@ CompositionMode_Overlay
@ CompositionMode_Multiply
@ CompositionMode_DestinationOver
@ CompositionMode_HardLight
@ CompositionMode_Exclusion
@ CompositionMode_ColorBurn
@ CompositionMode_Difference
@ CompositionMode_SoftLight
@ CompositionMode_DestinationIn
@ CompositionMode_SourceOut
@ CompositionMode_SourceIn
void setMiterLimit(qreal limit)
Sets the miter limit of this pen to the given limit.
\inmodule QtCore\reentrant
constexpr qreal x() const noexcept
Returns the x coordinate of this point.
constexpr qreal y() const noexcept
Returns the y coordinate of this point.
The QPolygonF class provides a list of points using floating point precision.
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
\inmodule QtCore \reentrant
@ InvertedGreedinessOption
T & top()
Returns a reference to the stack's top item.
T pop()
Removes the top item from the stack and returns it.
void push(const T &t)
Adds element t to the top of the stack.
constexpr void chop(qsizetype n) noexcept
Truncates this string view by length characters.
constexpr bool isEmpty() const noexcept
Returns whether this string view is empty - that is, whether {size() == 0}.
constexpr qsizetype size() const noexcept
Returns the size of this string view, in UTF-16 code units (that is, surrogate pairs count as two for...
bool endsWith(QStringView s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QString toString() const
Returns a deep copy of this string view's data as a QString.
int toInt(bool *ok=nullptr, int base=10) const
Returns the string view converted to an int using base base, which is 10 by default and must be betwe...
constexpr bool isNull() const noexcept
Returns whether this string view is null - that is, whether {data() == nullptr}.
constexpr QChar at(qsizetype n) const noexcept
Returns the character at position n in this string view.
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
Returns the substring of length length starting at position start in this object.
QStringView trimmed() const noexcept
Strips leading and trailing whitespace and returns the result.
const_pointer constData() const noexcept
\macro QT_RESTRICTED_CAST_FROM_ASCII
QByteArray toLatin1() const &
qsizetype lastIndexOf(QChar c, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
const_iterator constEnd() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing just after the last character in...
bool startsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string starts with s; otherwise returns false.
QString & replace(qsizetype i, qsizetype len, QChar after)
void chop(qsizetype n)
Removes n characters from the end of the string.
static QString fromLatin1(QByteArrayView ba)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QStringList split(const QString &sep, Qt::SplitBehavior behavior=Qt::KeepEmptyParts, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Splits the string into substrings wherever sep occurs, and returns the list of those strings.
const QChar * constData() const
Returns a pointer to the data stored in the QString.
qsizetype size() const
Returns the number of characters in this string.
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
QString mid(qsizetype position, qsizetype n=-1) const
Returns a string that contains n characters of this string, starting at the specified position index.
const QChar at(qsizetype i) const
Returns the character at the given index position in the string.
bool endsWith(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const
Returns true if the string ends with s; otherwise returns false.
bool isEmpty() const
Returns true if the string has no characters; otherwise returns false.
int compare(const QString &s, Qt::CaseSensitivity cs=Qt::CaseSensitive) const noexcept
QByteArray toLocal8Bit() const &
QString & append(QChar c)
QString trimmed() const &
QString & remove(qsizetype i, qsizetype len)
Removes n characters from the string, starting at the given position index, and returns a reference t...
QString & prepend(QChar c)
const_iterator constBegin() const
Returns a const \l{STL-style iterators}{STL-style iterator} pointing to the first character in the st...
const QChar * unicode() const
Returns a Unicode representation of the string.
void setRepeatCount(qreal repeatCount)
void setFreeze(bool freeze)
void setArgs(bool fill, const QList< QColor > &colors)
void setFillRule(Qt::FillRule f)
void setFillOpacity(qreal opacity)
void setGradientId(const QString &Id)
void setBrush(QBrush brush)
void setGradientResolved(bool resolved)
void setFillStyle(QSvgFillStyleProperty *style)
QSvgTinyDocument * doc() const
QSvgFont * svgFont() const
static constexpr qreal DEFAULT_UNITS_PER_EM
bool gradientStopsSet() const
void setTransform(const QTransform &transform)
void setStopLink(const QString &link, QSvgTinyDocument *doc)
QGradient * qgradient() const
QTransform qtransform() const
void setGradientStopsSet(bool set)
QIODevice * device() const
QSvgTinyDocument * document() const
int animationDuration() const
void parseCSStoXMLAttrs(const QString &css, QList< QSvgCssAttribute > *attributes)
void setAnimPeriod(int start, int end)
QColor currentColor() const
QSvgHandler(QIODevice *device)
LengthType defaultCoordinateSystem() const
bool processingInstruction(const QString &target, const QString &data)
void setDefaultCoordinateSystem(LengthType type)
QSvgStyleSelector * selector() const
bool endElement(QStringView localName)
bool startElement(const QString &localName, const QXmlStreamAttributes &attributes)
bool characters(QStringView str)
void pushColor(const QColor &color)
void setRequiredFeatures(const QStringList &lst)
void setXmlClass(const QString &str)
QSvgStyleProperty * styleProperty(QSvgStyleProperty::Type type) const
void setRequiredExtensions(const QStringList &lst)
void setRequiredFonts(const QStringList &lst)
void setNodeId(const QString &i)
QSvgNode * parent() const
void appendStyleProperty(QSvgStyleProperty *prop, const QString &id)
void setDisplayMode(DisplayMode display)
void setRequiredLanguages(const QStringList &lst)
QSvgTinyDocument * document() const
virtual Type type() const =0
void setVisible(bool visible)
void setRequiredFormats(const QStringList &lst)
@ ImageRenderingOptimizeQuality
@ ImageRenderingOptimizeSpeed
bool isGradientResolved() const
void setDashArray(const QList< qreal > &dashes)
void setMiterLimit(qreal limit)
void setStyle(QSvgFillStyleProperty *style)
void setGradientId(const QString &Id)
QString gradientId() const
void setStroke(QBrush brush)
void setWidth(qreal width)
void setGradientResolved(bool resolved)
void setDashOffset(qreal offset)
void setLineCap(Qt::PenCapStyle cap)
void setVectorEffect(bool nonScalingStroke)
void setOpacity(qreal opacity)
void setLineJoin(Qt::PenJoinStyle join)
QSvgNode * previousSiblingNode(QSvgNode *n) const
void addChild(QSvgNode *child, const QString &id)
QList< QSvgNode * > renderers() const
virtual Type type() const =0
QStringList nodeNames(NodePtr node) const override
QSvgStructureNode * svgStructure(NodePtr node) const
bool hasAttributes(NodePtr node) const override
QString attributeValue(NodePtr node, const QCss::AttributeSelector &asel) const override
bool isNullNode(NodePtr node) const override
QSvgStructureNode * nodeToStructure(QSvgNode *n) const
void freeNode(NodePtr node) const override
QString nodeToName(QSvgNode *node) const
QSvgNode * svgNode(NodePtr node) const
QStringList nodeIds(NodePtr node) const override
virtual ~QSvgStyleSelector()
NodePtr duplicateNode(NodePtr node) const override
NodePtr previousSiblingNode(NodePtr node) const override
bool nodeNameEquals(NodePtr node, const QString &nodeName) const override
NodePtr parentNode(NodePtr node) const override
void setTextArea(const QSizeF &size)
void setViewBox(const QRectF &rect)
void setWidth(int len, bool percent)
QSvgFont * svgFont(const QString &family) const
void addSvgFont(QSvgFont *)
void setHeight(int len, bool percent)
bool isRelative() const
Returns true if the URL is relative; otherwise returns false.
Q_CORE_EXPORT void append(const QString &namespaceUri, const QString &name, const QString &value)
Q_CORE_EXPORT QStringView value(QAnyStringView namespaceUri, QAnyStringView name) const noexcept
QSet< QString >::iterator it
struct wl_display * display
Combined button and popup list for selecting options.
#define Q_STATIC_ASSERT(Condition)
#define QByteArrayLiteral(str)
size_t qstrlen(const char *str)
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter * iter
DBusConnection const char DBusError * error
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char * method
static struct AttrInfo attrs[]
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
EGLOutputLayerEXT EGLint attribute
int qFpClassify(qfloat16 f) noexcept
qfloat16 qSqrt(qfloat16 f)
#define Q_LOGGING_CATEGORY(name,...)
#define qCWarning(category,...)
#define qCDebug(category,...)
constexpr float qDegreesToRadians(float degrees)
static QT_BEGIN_NAMESPACE const qreal Q_PI
constexpr const T & qMin(const T &a, const T &b)
constexpr const T & qBound(const T &min, const T &val, const T &max)
constexpr const T & qMax(const T &a, const T &b)
constexpr T qAbs(const T &t)
GLenum GLsizei GLsizei GLint * values
[15]
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLenum GLenum GLsizei count
GLenum GLsizeiptr fontSize
GLsizei const GLfloat * dashArray
GLenum const void GLbitfield fontStyle
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLuint GLintptr offset
GLuint GLfloat GLfloat y0
GLfloat GLfloat GLfloat GLfloat h
GLenum GLenum GLsizei void GLsizei void * column
GLuint GLenum GLenum transform
GLfixed GLfixed GLint GLint GLfixed points
GLfixed GLfixed GLfixed y2
GLsizei const GLchar *const * path
static QT_BEGIN_NAMESPACE const QRgb colors[][14]
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QT_BEGIN_NAMESPACE typedef unsigned int QRgb
constexpr QRgb qRgb(int r, int g, int b)
static QLatin1StringView typeStr(QShaderDescription::VariableType t)
#define qPrintable(string)
static char * toLocal8Bit(char *out, QStringView in, QStringConverter::State *state)
QLatin1StringView QLatin1String
static FactoryMethod findGraphicsFactory(const QString &name)
bool(* ParseMethod)(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
static QSvgNode * createTspanNode(QSvgNode *parent, const QXmlStreamAttributes &, QSvgHandler *)
static void parseVisibility(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static QSvgStyleProperty * styleFromUrl(QSvgNode *node, const QString &url)
static qreal convertToPixels(qreal len, bool, QSvgHandler::LengthType type)
static QSvgNode * createGNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseStyleNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createImageNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createPolygonNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static StyleParseMethod findStyleUtilFactoryMethod(const QString &name)
static void parseOthers(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static void parseRenderingHints(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static const int unfinishedElementsLimit
static bool isDigit(ushort ch)
static void parseCSStoXMLAttrs(const QList< QCss::Declaration > &declarations, QXmlStreamAttributes &attributes)
static QSvgNode::DisplayMode displayStringToEnum(const QString &str)
static bool parseMpathNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QByteArray prefixMessage(const QByteArray &msg, const QXmlStreamReader *r)
static QString idFromUrl(const QString &url)
static bool parseTitleNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QPainter::CompositionMode svgToQtCompositionMode(const QString &op)
static QSvgNode * createDefsNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgStyleProperty * createFontNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static int parseClockValue(QStringView str, bool *ok)
static bool parseFontFaceNameNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static ParseMethod findUtilFactory(const QString &name)
bool(* StyleParseMethod)(QSvgStyleProperty *, const QXmlStreamAttributes &, QSvgHandler *)
static QSvgNode * createAnimationNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseTransform(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static qreal parseLength(QStringView str, QSvgHandler::LengthType &type, QSvgHandler *handler, bool *ok=NULL)
static void parseColor(QSvgNode *, const QSvgAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createCircleNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QByteArray msgCouldNotResolveProperty(const QString &id, const QXmlStreamReader *r)
static QSvgStyleProperty * createLinearGradientNode(QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createLineNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static FontSizeSpec fontSizeSpec(QStringView spec)
static bool parseAnimateColorNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgStyleProperty * createSolidColorNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
bool qsvg_get_hex_rgb(const char *name, QRgb *rgb)
static QT_BEGIN_NAMESPACE const char * qt_inherit_text
QSvgNode *(* FactoryMethod)(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
static StyleFactoryMethod findStyleFactoryMethod(const QString &name)
static void parseBaseGradient(QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgGradientStyle *gradProp, QSvgHandler *handler)
static bool parseAudioNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool resolveColor(QStringView colorStr, QColor &color, QSvgHandler *handler)
static QList< qreal > parsePercentageList(const QChar *&str)
static bool parseMetadataNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseAnimateTransformNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QTransform parseTransformationMatrix(QStringView value)
static QSvgNode * createSwitchNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseDiscardNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseOpacity(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static bool parseScriptNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseHandlerNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QList< qreal > parseNumbersList(const QChar *&str)
static bool createSvgGlyph(QSvgFont *font, const QXmlStreamAttributes &attributes)
static bool parseCoreNode(QSvgNode *node, const QXmlStreamAttributes &attributes)
static bool constructColor(QStringView colorStr, QStringView opacity, QColor &color, QSvgHandler *handler)
static const char * QSvgStyleSelector_nodeString[]
static bool parseStyle(QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseHkernNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createTextNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static void parsePen(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createSvgNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
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 FactoryMethod findGroupFactory(const QString &name)
static bool parseForeignObjectNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseTbreakNode(QSvgNode *parent, const QXmlStreamAttributes &, QSvgHandler *)
static bool parseDescNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseFont(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createRectNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
QSvgStyleProperty *(* StyleFactoryMethod)(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
static QSvgNode * createPolylineNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseFontFaceNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static qreal toDouble(const QChar *&str)
static bool parseMissingGlyphNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parsePrefetchNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static int qsvg_hex2int(const char *s, bool *ok=nullptr)
static bool parseGlyphNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static int qsvg_h2i(char hex, bool *ok=nullptr)
static QSvgNode * createVideoNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseCompOp(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static bool parsePathDataFast(QStringView data, QPainterPath &path)
static bool parseFontFaceSrcNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseAnchorNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseFontFaceUriNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QStringList stringToList(const QString &str)
static bool parseStopNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static void parseBrush(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
static void parseNumbersArray(const QChar *&str, QVarLengthArray< qreal, 8 > &points, const char *pattern=nullptr)
static const qreal sizeTable[]
static void pathArcSegment(QPainterPath &path, qreal xc, qreal yc, qreal th0, qreal th1, qreal rx, qreal ry, qreal xAxisRotation)
static void cssStyleLookup(QSvgNode *node, QSvgHandler *handler, QSvgStyleSelector *selector)
static bool parseAimateMotionNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static qreal convertToNumber(QStringView str, QSvgHandler *handler, bool *ok=NULL)
static QSvgNode * createUseNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QByteArray msgProblemParsing(const QString &localName, const QXmlStreamReader *r)
static QSvgNode * createPathNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseSetNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseNumberTriplet(QList< qreal > &values, const QChar *&s)
static QSvgNode * createEllipseNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseAnimateNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createTextAreaNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgStyleProperty * createRadialGradientNode(QSvgNode *node, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QString someId(const QXmlStreamAttributes &attributes)
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
static const uchar magic[MagicLength]
QList< QChar > characters
QFileInfo info(fileName)
[8]
QFileInfo fi("c:/temp/foo")
[newstuff]
QFileSelector selector
[1]
QUrl url("example.com")
[constructor-url-reference]
QGraphicsEllipseItem * ellipse
scene addText("Hello, world!")
char * toString(const MyType &t)
[31]
QExplicitlySharedDataPointer< DeclarationData > d
Q_GUI_EXPORT QString lexem() const
\inmodule QtCore \reentrant
QStringView strokeDashOffset
QStringView strokeDashArray
QStringView strokeOpacity
QStringView strokeLineJoin
QList< QSvgCssAttribute > m_cssAttributes
QSvgAttributes(const QXmlStreamAttributes &xmlAttributes, QSvgHandler *handler)
QStringView strokeLineCap
QStringView strokeMiterLimit
QStringView imageRendering
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent