4#include "qplatformdefs.h"
30#include "private/qmath_p.h"
41#define QT_INHERIT QLatin1String(qt_inherit_text)
47 if (
const QFile *
file = qobject_cast<const QFile *>(
r->device()))
77 if (
hex >=
'0' &&
hex <=
'9')
79 if (
hex >=
'a' &&
hex <=
'f')
80 return hex -
'a' + 10;
81 if (
hex >=
'A' &&
hex <=
'F')
82 return hex -
'A' + 10;
111 }
else if (
len == 9) {
115 }
else if (
len == 6) {
119 }
else if (
len == 3) {
139 for(
int i = 0;
i <
len; ++
i)
140 tmp[
i] =
str[
i].toLatin1();
199#ifndef QT_NO_CSSPARSER
206 for (
int i = 0;
i < xmlAttributes.size(); ++
i) {
207 const QXmlStreamAttribute &
attribute = xmlAttributes.
at(
i);
213 switch (
name.at(0).unicode()) {
253 id =
value.toString();
283 if (strokeRef.isEmpty())
321 id =
value.toString();
331#ifndef QT_NO_CSSPARSER
342 switch (
name.at(0).unicode()) {
410 if (strokeRef.isEmpty())
456#ifndef QT_NO_CSSPARSER
513 return n->xmlClass();
520 (!
n->nodeId().isEmpty() || !
n->xmlClass().isEmpty()));
555 newNode.
ptr = svgParent;
572 newNode.
ptr = svgParent->previousSiblingNode(
n);
595 return ((
ch >> 4) == 3) && (
magic >> (
ch & 15));
600 const int maxLen = 255;
642 const char *
t = temp;
648 while(*
t && *
t !=
'.') {
694 while (
str->isSpace())
702 while (
str->isSpace())
708 while (
str->isSpace())
719 while (
str->isSpace())
725 if (patternLen &&
pattern[
points.size() % patternLen] ==
'f') {
735 while (
str->isSpace())
741 while (
str->isSpace())
752 while (
str->isSpace())
760 while (
str->isSpace())
764 while (
str->isSpace())
770 while (
str->isSpace())
784 while (itr !=
end && (*itr).isSpace())
790 while (itr !=
end && (*itr).isSpace())
814 if (colorStrTr.isEmpty())
817 switch(colorStrTr.at(0).unicode()) {
834 if (colorStrTr.size() >= 7 && colorStrTr.at(colorStrTr.size() - 1) ==
QLatin1Char(
')')
836 const QChar *
s = colorStrTr.constData() + 4;
840 if (compo.size() == 1) {
841 s = colorStrTr.constData() + 4;
843 for (
int i = 0;
i < compo.size(); ++
i)
847 if (compo.size() == 3) {
873 return color.isValid();
896 if (numStr.isEmpty()) {
948 QChar unicode = (uncStr.isEmpty()) ? u
'\0' : uncStr.at(0);
954 font->addGlyph(unicode,
path, havx);
975 return len * 3.543307;
978 return len * 35.43307;
1057 if (
value.isEmpty())
1079 const char *
ident =
"atrix";
1080 for (
int i = 0;
i < 5; ++
i)
1086 const char *
ident =
"ranslate";
1087 for (
int i = 0;
i < 8; ++
i)
1093 const char *
ident =
"otate";
1094 for (
int i = 0;
i < 5; ++
i)
1102 const char *
ident =
"ale";
1103 for (
int i = 0;
i < 3; ++
i)
1129 while (str < end && str->isSpace())
1134 QVarLengthArray<qreal, 8>
points;
1140 if(
state == Matrix) {
1146 }
else if (
state == Translate) {
1149 else if (
points.size() == 2)
1153 }
else if (
state == Rotate) {
1156 }
else if (
points.size() == 3) {
1163 }
else if (
state == Scale) {
1171 }
else if (
state == SkewX) {
1175 }
else if (
state == SkewY) {
1234 bool allZeroes =
true;
1235 for (
qreal dash : dashes) {
1244 if (allZeroes ==
false) {
1246 if ((dashes.size() & 1) != 0)
1247 dashes << QList<qreal>(dashes);
1309 switch (spec.
at(0).unicode()) {
1364 family = family.
mid(1, family.
size() - 2);
1442 if (!
matrix.isIdentity()) {
1468 qreal a00, a01, a10, a11;
1473 sinTh =
qSin(xAxisRotation * (
Q_PI / 180.0));
1474 cosTh =
qCos(xAxisRotation * (
Q_PI / 180.0));
1481 thHalf = 0.5 * (th1 - th0);
1482 t = (8.0 / 3.0) *
qSin(thHalf * 0.5) *
qSin(thHalf * 0.5) /
qSin(thHalf);
1485 x3 = xc +
qCos(th1);
1486 y3 = yc +
qSin(th1);
1491 a00 *
x2 + a01 *
y2, a10 *
x2 + a11 *
y2,
1492 a00 * x3 + a01 * y3, a10 * x3 + a11 * y3);
1524 qreal x_axis_rotation,
1537 qreal sin_th, cos_th;
1538 qreal a00, a01, a10, a11;
1540 qreal d, sfactor, sfactor_sq;
1541 qreal th0, th1, th_arc;
1543 qreal dx, dy, dx1, dy1, Px, Py, check;
1548 sin_th =
qSin(x_axis_rotation * (
Q_PI / 180.0));
1549 cos_th =
qCos(x_axis_rotation * (
Q_PI / 180.0));
1551 dx = (curx -
x) / 2.0;
1552 dy = (cury -
y) / 2.0;
1553 dx1 = cos_th * dx + sin_th * dy;
1554 dy1 = -sin_th * dx + cos_th * dy;
1558 check = Px / Pr1 + Py / Pr2;
1568 x0 = a00 * curx + a01 * cury;
1569 y0 = a10 * curx + a11 * cury;
1570 x1 = a00 *
x + a01 *
y;
1571 y1 = a10 *
x + a11 *
y;
1580 sfactor_sq = 1.0 /
d - 0.25;
1581 if (sfactor_sq < 0) sfactor_sq = 0;
1582 sfactor =
qSqrt(sfactor_sq);
1583 if (sweep_flag == large_arc_flag) sfactor = -sfactor;
1584 xc = 0.5 * (
x0 +
x1) - sfactor * (
y1 -
y0);
1585 yc = 0.5 * (
y0 +
y1) + sfactor * (
x1 -
x0);
1592 if (th_arc < 0 && sweep_flag)
1594 else if (th_arc > 0 && !sweep_flag)
1599 for (
i = 0;
i < n_segs;
i++) {
1601 th0 +
i * th_arc / n_segs,
1602 th0 + (
i + 1) * th_arc / n_segs,
1603 rx,
ry, x_axis_rotation);
1609 const int maxElementCount = 0x7fff;
1619 while (
str->isSpace() && (
str + 1) !=
end)
1625 const char *
pattern =
nullptr;
1628 QVarLengthArray<qreal, 8>
arg;
1638 switch (pathElem.unicode()) {
1644 x =
x0 =
num[0] + offsetX;
1645 y =
y0 =
num[1] + offsetY;
1679 path.closeSubpath();
1687 x =
num[0] + offsetX;
1688 y =
num[1] + offsetY;
1708 x =
num[0] + offsetX;
1722 y =
num[0] + offsetY;
1773 if (lastMode ==
'c' || lastMode ==
'C' ||
1774 lastMode ==
's' || lastMode ==
'S')
1775 c1 =
QPointF(2*
x-ctrlPt.x(), 2*
y-ctrlPt.y());
1794 if (lastMode ==
'c' || lastMode ==
'C' ||
1795 lastMode ==
's' || lastMode ==
'S')
1796 c1 =
QPointF(2*
x-ctrlPt.x(), 2*
y-ctrlPt.y());
1848 if (lastMode ==
'q' || lastMode ==
'Q' ||
1849 lastMode ==
't' || lastMode ==
'T')
1868 if (lastMode ==
'q' || lastMode ==
'Q' ||
1869 lastMode ==
't' || lastMode ==
'T')
1895 int(sweepFlag), ex, ey, curx, cury);
1917 int(sweepFlag), ex, ey, curx, cury);
1927 lastMode = pathElem.toLatin1();
1928 if (limitLength &&
path.elementCount() > maxElementCount)
1936 const QXmlStreamAttributes &attributes,
1943#ifndef QT_NO_CSSPARSER
1946 QXmlStreamAttributes &attributes)
1948 for (
int i = 0;
i < declarations.size(); ++
i) {
1950 if (decl.
d->property.isEmpty())
1954 const int valCount = decl.
d->values.size();
1955 if (valCount != 1) {
1956 for (
int i = 0;
i < valCount; ++
i) {
1957 valueStr += decl.
d->values[
i].toString();
1958 if (
i + 1 < valCount)
1962 valueStr =
val.toString();
1969 valueStr.
append(lst.at(0));
1971 for (
int i = 1;
i < lst.size(); ++
i) {
1973 if ((
i +1) < lst.size())
1978 switch (
val.variant.toInt()) {
1987 attributes.append(
QString(), decl.
d->property, valueStr);
1994 m_cssParser.
init(css);
1997 attributes->reserve(10);
1999 while (m_cssParser.
hasNext()) {
2026 const int firstSymbol = m_cssParser.
index;
2027 int symbolCount = 0;
2034 if (canExtractValueByRef) {
2036 for (
int i = firstSymbol + 1;
i < firstSymbol + symbolCount; ++
i) {
2041 canExtractValueByRef =
false;
2045 if (canExtractValueByRef) {
2050 if (!canExtractValueByRef) {
2052 for (
int i = firstSymbol;
i < m_cssParser.
index - 1; ++
i)
2066 QXmlStreamAttributes &attributes)
2070 QList<QCss::Declaration> decls =
selector->declarationsForNode(cssNode);
2080 QXmlStreamAttributes attributes;
2094 return envAssumeTrusted;
2104 const QXmlStreamAttributes &attributes)
2113 for (
int i = 0;
i < attributes.size(); ++
i) {
2114 const QXmlStreamAttribute &
attribute = attributes.at(
i);
2119 switch (
name.at(0).unicode()) {
2174#define NOOP qDebug()<<"Operation: "<<op<<" is not implemented"
2238 if (!
value.isEmpty()) {
2294 if (!displayStr.isEmpty()) {
2308 if (maskStr.size() > 3 && maskStr.mid(0, 3) ==
QLatin1String(
"url"))
2309 maskStr = maskStr.
mid(3, maskStr.size() - 3);
2320 if (markerStr.size() > 3 && markerStr.mid(0, 3) ==
QLatin1String(
"url"))
2321 markerStr = markerStr.
mid(3, markerStr.size() - 3);
2330 if (markerStr.size() > 3 && markerStr.mid(0, 3) ==
QLatin1String(
"url"))
2331 markerStr = markerStr.
mid(3, markerStr.size() - 3);
2340 if (markerStr.size() > 3 && markerStr.mid(0, 3) ==
QLatin1String(
"url"))
2341 markerStr = markerStr.
mid(3, markerStr.size() - 3);
2352 if (filterStr.size() > 3 && filterStr.mid(0, 3) ==
QLatin1String(
"url"))
2353 filterStr = filterStr.
mid(3, filterStr.size() - 3);
2387 parsePen(node, attributes, handler);
2398 value = attributes.value(
"audio-level");
2400 value = attributes.value(
"color-rendering");
2402 value = attributes.value(
"display-align");
2404 value = attributes.value(
"image-rendering");
2406 value = attributes.value(
"line-increment");
2408 value = attributes.value(
"pointer-events");
2410 value = attributes.value(
"shape-rendering");
2412 value = attributes.value(
"solid-color");
2414 value = attributes.value(
"solid-opacity");
2416 value = attributes.value(
"text-rendering");
2418 value = attributes.value(
"vector-effect");
2420 value = attributes.value(
"viewport-fill");
2422 value = attributes.value(
"viewport-fill-opacity");
2428 const QXmlStreamAttributes &
attrs,
2435 const QXmlStreamAttributes &attributes,
2443 const QXmlStreamAttributes &attributes,
2463 if (
val > std::numeric_limits<int>::min() &&
val < std::numeric_limits<int>::max())
2464 res =
static_cast<int>(
val);
2472 const QXmlStreamAttributes &attributes,
2485 if (valuesStr.isEmpty()) {
2486 QColor startColor, endColor;
2490 colors.append(startColor);
2495 QStringList::const_iterator itr;
2525 const QXmlStreamAttributes &attributes,
2541 const QXmlStreamAttributes &attributes,
2562 if (fromStr.isEmpty()) {
2563 if (!byStr.isEmpty()) {
2579 }
else if (!byStr.isEmpty()) {
2583 for (
int i = vals.size() - 3;
i < vals.size(); ++
i)
2584 vals[
i] += vals[
i - 3];
2598 if (vals.size() % 3 != 0)
2638 const QXmlStreamAttributes &attributes,
2646 const QXmlStreamAttributes &attributes,
2654 const QXmlStreamAttributes &attributes,
2672 const QXmlStreamAttributes &attributes,
2681 const QXmlStreamAttributes &attributes,
2689 const QXmlStreamAttributes &attributes,
2707 const QXmlStreamAttributes &attributes,
2716 parent = parent->
parent();
2719 if (parent && !myId.isEmpty()) {
2724 font->setFamilyName(myId);
2733 const QXmlStreamAttributes &attributes,
2749 if (!
name.isEmpty())
2751 font->setUnitsPerEm(unitsPerEm);
2753 if (!
font->familyName().isEmpty())
2761 const QXmlStreamAttributes &attributes,
2772 if (!
name.isEmpty())
2775 if (!
font->familyName().isEmpty())
2783 const QXmlStreamAttributes &attributes,
2791 const QXmlStreamAttributes &attributes,
2799 const QXmlStreamAttributes &attributes,
2807 const QXmlStreamAttributes &attributes,
2816 const QXmlStreamAttributes &attributes,
2830 const QXmlStreamAttributes &attributes,
2838 const QXmlStreamAttributes &attributes,
2846 const QXmlStreamAttributes &attributes,
2863 filename = filename.
trimmed();
2865 qCWarning(lcSvgHandler) <<
"QSvgHandler: Image filename is empty";
2868 if (nwidth <= 0 || nheight <= 0) {
2869 qCWarning(lcSvgHandler) <<
"QSvgHandler: Width or height for" << filename <<
"image was not greater than 0";
2878 } filenameType = NotLoaded;
2887 filenameType = LoadedFromData;
2891 if (
image.isNull()) {
2892 const auto *
file = qobject_cast<QFile *>(handler->
device());
2897 filename =
info.absoluteDir().absoluteFilePath(filename);
2903 filenameType = LoadedFromFile;
2907 if (
image.isNull()) {
2908 qCWarning(lcSvgHandler) <<
"Could not create image from" << filename;
2917 filenameType == LoadedFromFile ? filename :
QString{},
2926 const QXmlStreamAttributes &attributes,
2938 QLineF lineBounds(nx1, ny1, nx2, ny2);
2945 const QXmlStreamAttributes &attributes,
2963 QGradient *grad = gradProp->qgradient();
2964 if (node && !link.
isEmpty()) {
2970 if (!inherited->stopLink().isEmpty()) {
2973 grad->
setStops(inherited->qgradient()->stops());
2974 gradProp->setGradientStopsSet(inherited->gradientStopsSet());
2977 matrix = inherited->qtransform();
2979 gradProp->setStopLink(link, handler->
document());
2985 gradProp->setTransform(
matrix);
2986 }
else if (!
matrix.isIdentity()) {
2987 gradProp->setTransform(
matrix);
3006 const QXmlStreamAttributes &attributes,
3042 const QXmlStreamAttributes &attributes,
3050 const QXmlStreamAttributes &attributes,
3064 const QXmlStreamAttributes &attributes,
3072 const QXmlStreamAttributes &attributes,
3080 const QXmlStreamAttributes &,
3087 const QXmlStreamAttributes &attributes,
3112 if (
x.isEmpty() || !
ok) {
3123 if (
y.isEmpty() || !
ok) {
3140 nwidth = nwidth / 100.;
3151 nheight = nheight / 100.;
3172 if (!xStr.isEmpty()) {
3187 if (!yStr.isEmpty()) {
3202 if (!widthStr.isEmpty()) {
3213 rect->setWidth(1.2);
3217 if (!heightStr.isEmpty()) {
3228 rect->setHeight(1.2);
3234 const QXmlStreamAttributes &attributes,
3257 *inString = attributes.value(
QLatin1String(
"in")).toString();
3258 *outString = attributes.value(
QLatin1String(
"result")).toString();
3264 const QXmlStreamAttributes &attributes,
3279 &inputString, &outputString, &
rect);
3285 else if (typeString.startsWith(
QLatin1String(
"luminanceToAlpha")))
3290 if (!valuesString.isEmpty()) {
3294 for (
int i = 0,
j = 0;
i <
qMin(20, valueStringList.size());
i++) {
3312 const QXmlStreamAttributes &attributes,
3325 &inputString, &outputString, &
rect);
3326 qreal stdDeviationX = 0;
3327 qreal stdDeviationY = 0;
3332 stdDeviationY = stdDeviationX =
qMax(0.,
toDouble(stdDeviationString));
3341 stdDeviationX, stdDeviationY, edgemode);
3346 const QXmlStreamAttributes &attributes,
3357 &inputString, &outputString, &
rect);
3360 if (!dxString.isEmpty()) {
3368 if (!dyString.isEmpty()) {
3381 const QXmlStreamAttributes &attributes,
3396 &inputString, &outputString, &
rect);
3409 else if (operatorString.startsWith(
QStringLiteral(
"arithmetic")))
3437 const QXmlStreamAttributes &attributes,
3445 &inputString, &outputString, &
rect);
3452 const QXmlStreamAttributes &attributes,
3467 &inputString, &outputString, &
rect);
3474 const QXmlStreamAttributes &attributes,
3482 &inputString, &outputString, &
rect);
3489 const QXmlStreamAttributes &attributes,
3497 &inputString, &outputString, &
rect);
3505 QSvgSymbolLike::PreserveAspectRatios *aspect,
3522 if (!xStr.isEmpty()) {
3529 if (!yStr.isEmpty()) {
3536 if (!widthStr.isEmpty()) {
3543 if (!heightStr.isEmpty()) {
3553 if (!refXStr.isEmpty()) {
3560 if (!refYStr.isEmpty()) {
3569 if (!viewBoxStr.isEmpty()) {
3576 if (viewBoxValues.size() == 4) {
3577 QString xStr = viewBoxValues.
at(0).trimmed();
3578 QString yStr = viewBoxValues.
at(1).trimmed();
3579 QString widthStr = viewBoxValues.
at(2).trimmed();
3580 QString heightStr = viewBoxValues.
at(3).trimmed();
3604 for (
auto &pAStr : std::as_const(pAspectRStrs)) {
3622 *aspect = aspectX | aspectY | aspectMS;
3644 const QXmlStreamAttributes &attributes,
3649 QSvgSymbolLike::PreserveAspectRatios aspect;
3661 const QXmlStreamAttributes &attributes,
3666 QSvgSymbolLike::PreserveAspectRatios aspect;
3672 qreal orientationAngle = 0;
3674 if (orientStr.startsWith(
QLatin1String(
"auto-start-reverse")))
3683 a = 360. *
toDouble(orientStr.mid(0, orientStr.length()-4), &
ok);
3685 a =
toDouble(orientStr.mid(0, orientStr.length()-4), &
ok);
3687 a = 180. /
M_PI *
toDouble(orientStr.mid(0, orientStr.length()-3), &
ok);
3691 orientationAngle =
a;
3695 if (markerUnitsStr.startsWith(
QLatin1String(
"userSpaceOnUse")))
3702 orientation, orientationAngle, markerUnits);
3707 const QXmlStreamAttributes &attributes,
3715 qCWarning(lcSvgHandler,
"Invalid path data; path truncated.");
3722 const QXmlStreamAttributes &attributes,
3728 const QChar *
s = pointsStr.constData();
3731 for (
int i = 0;
i < poly.size(); ++
i)
3738 const QXmlStreamAttributes &attributes,
3744 const QChar *
s = pointsStr.constData();
3747 for (
int i = 0;
i < poly.size(); ++
i)
3755 const QXmlStreamAttributes &attributes,
3763 const QXmlStreamAttributes &attributes,
3802 const QXmlStreamAttributes &attributes,
3829 if (!
rx.isEmpty() &&
ry.isEmpty())
3831 else if (!
ry.isEmpty() &&
rx.isEmpty())
3837 if (nrx > bounds.
width()/2)
3838 nrx = bounds.
width()/2;
3839 if (nry > bounds.
height()/2)
3845 nrx *= (100/(bounds.
width()/2));
3846 nry *= (100/(bounds.
height()/2));
3853 const QXmlStreamAttributes &attributes,
3861 const QXmlStreamAttributes &attributes,
3869 const QXmlStreamAttributes &attributes,
3876 if (solidOpacityStr.isEmpty())
3877 solidOpacityStr = attributes.value(
QLatin1String(
"opacity"));
3887 const QXmlStreamAttributes &attributes,
3903 QXmlStreamAttributes xmlAttr = attributes;
3905#ifndef QT_NO_CSSPARSER
3922 if (colorStr.isEmpty()) {
3933 stops = grad->
stops();
3941 if ((stops.
size() == 1) || (stops.
at(stops.
size() - 2).first < 1.0 - FLT_EPSILON)) {
3942 stops.
back().first = 1.0 - FLT_EPSILON;
3954 const QXmlStreamAttributes &attributes,
3958#ifdef QT_NO_CSSPARSER
3971 const QXmlStreamAttributes &attributes,
3983 if (!widthStr.isEmpty()) {
3990 if (!heightStr.isEmpty()) {
3998 if (!viewBoxStr.isEmpty()) {
4005 if (viewBoxValues.size() == 4) {
4006 QString xStr = viewBoxValues.
at(0).trimmed();
4007 QString yStr = viewBoxValues.
at(1).trimmed();
4008 QString widthStr = viewBoxValues.
at(2).trimmed();
4009 QString heightStr = viewBoxValues.
at(3).trimmed();
4032 const QXmlStreamAttributes &attributes,
4041 const QXmlStreamAttributes &attributes,
4088 nwidth = nwidth / 100.;
4097 nheight = nheight / 100.;
4102 if (!viewBoxStr.isEmpty()) {
4109 if (viewBoxValues.size() == 4) {
4110 QString xStr = viewBoxValues.
at(0).trimmed();
4111 QString yStr = viewBoxValues.
at(1).trimmed();
4112 QString widthStr = viewBoxValues.
at(2).trimmed();
4113 QString heightStr = viewBoxValues.
at(3).trimmed();
4125 if (!patternTransform.isEmpty())
4132 QSvgRectF patternRectF(bounds, nPatternUnits, nPatternUnits, nPatternUnits, nPatternUnits);
4143 const QXmlStreamAttributes &,
4148 static_cast<QSvgText*
>(parent)->addLineBreak();
4153 const QXmlStreamAttributes &attributes,
4170 const QXmlStreamAttributes &attributes,
4184 const QXmlStreamAttributes &,
4191 const QXmlStreamAttributes &attributes,
4200 linkId = attributes.value(
QLatin1String(
"href")).toString().remove(0, 1);
4201 switch (parent->
type()) {
4215 if (!xStr.isNull() || !yStr.isNull()) {
4230 return new QSvgUse(pt, parent, link);
4234 return new QSvgUse(pt, parent, linkId);
4242 const QXmlStreamAttributes &attributes,
4257 switch (
name.at(0).unicode()) {
4292 switch (
name.at(0).unicode()) {
4370 if (unsupportedFilters.contains(
name))
4384 switch (
name.at(0).unicode()) {
4427 const QXmlStreamAttributes &,
4436 switch (
name.at(0).unicode()) {
4456 const QXmlStreamAttributes &,
4465 switch (
name.at(0).unicode()) {
4489 , m_ownsReader(true)
4496 :
xml(new QXmlStreamReader(
data))
4497 , m_ownsReader(true)
4505 , m_ownsReader(
false)
4511void QSvgHandler::init()
4516 m_defaultCoords =
LT_PX;
4528 if (active.contains(patternStyle->patternNode()))
4536 if (active.contains(patternStyle->patternNode()))
4547 switch (node->
type()) {
4554 active.append(node);
4557 for (
auto *
r :
g->renderers()) {
4565 if (active.contains(node))
4568 auto *u =
static_cast<const QSvgUse*
>(node);
4598void QSvgHandler::parse()
4600 xml->setNamespaceProcessing(
false);
4601#ifndef QT_NO_CSSPARSER
4607 while (!xml->atEnd() && !
done) {
4608 switch (xml->readNext()) {
4609 case QXmlStreamReader::StartElement:
4618 if (remainingUnfinishedElements
4619 &&
startElement(xml->name().toString(), xml->attributes())) {
4620 --remainingUnfinishedElements;
4627 case QXmlStreamReader::EndElement:
4629 ++remainingUnfinishedElements;
4631 case QXmlStreamReader::Characters:
4634 case QXmlStreamReader::ProcessingInstruction:
4635 processingInstruction(xml->processingInstructionTarget().toString(), xml->processingInstructionData().toString());
4641 resolvePaintServers(m_doc);
4644 qCWarning(lcSvgHandler,
"Cycles detected in SVG, document discarded.");
4651 const QXmlStreamAttributes &attributes)
4661 if (xmlSpace.isNull()) {
4669 const QByteArray msg =
'"' + xmlSpace.toString().toLocal8Bit()
4670 +
"\" is an invalid value for attribute xml:space. "
4671 "Valid values are \"preserve\" and \"default\".";
4680 m_skipNodes.
push(Doc);
4681 qCWarning(lcSvgHandler) <<
"Skipping a nested svg element, because "
4682 "SVG Document must not contain nested svg elements in Svg Tiny 1.2";
4685 if (!m_skipNodes.
isEmpty() && m_skipNodes.
top() == Doc)
4690 node =
method(m_doc ? m_nodes.
top() : 0, attributes,
this);
4697 switch (m_nodes.
top()->
type()) {
4723#ifndef QT_NO_CSSPARSER
4728 m_toBeResolved.
append(node);
4734 node =
method(m_nodes.
top(), attributes,
this);
4736 switch (m_nodes.
top()->
type()) {
4779#ifndef QT_NO_CSSPARSER
4784 static_cast<QSvgText *
>(node)->setWhitespaceMode(m_whitespaceMode.
top());
4786 static_cast<QSvgTspan *
>(node)->setWhitespaceMode(m_whitespaceMode.
top());
4788 auto useNode =
static_cast<QSvgUse *
>(node);
4789 if (!useNode->isResolved())
4790 m_toBeResolved.
append(useNode);
4797 node =
method(m_nodes.
top(), attributes,
this);
4813 if (!
method(m_nodes.
top(), attributes,
this))
4826 if (!
method(m_style, attributes,
this))
4830 qCDebug(lcSvgHandler) <<
"Skipping unknown element" << localName;
4831 m_skipNodes.
push(Unknown);
4837 m_skipNodes.
push(Graphics);
4840 m_skipNodes.
push(Style);
4847 CurrentNode node = m_skipNodes.
top();
4853 m_whitespaceMode.
pop();
4857 if (node == Unknown)
4860#ifdef QT_NO_CSSPARSER
4867 if (node == Graphics)
4869 else if (m_style && !m_skipNodes.
isEmpty() && m_skipNodes.
top() != Style)
4872 return ((localName ==
QLatin1String(
"svg")) && (node != Doc));
4875void QSvgHandler::resolvePaintServers(
QSvgNode *node,
int nestedDepth)
4884 const QList<QSvgNode *> ren = structureNode->
renderers();
4887 if (
fill && !
fill->isPaintStyleResolved()) {
4891 fill->setFillStyle(style);
4910 if (nestedDepth < 2048)
4911 resolvePaintServers(*
it, nestedDepth + 1);
4915void QSvgHandler::resolveNodes()
4917 for (
QSvgNode *node :
std::as_const(m_toBeResolved)) {
4920 const auto parent = useNode->
parent();
4935 if (useNode->parent()->isDescendantOf(link))
4938 useNode->setLink(link);
4944 filter->setSupported(
false);
4950 m_toBeResolved.
clear();
4955#ifndef QT_NO_CSSPARSER
4978 return xml->device();
4988 return m_defaultCoords;
4993 m_defaultCoords =
type;
4999 m_colorTagCount.
push(1);
5004 if (m_colorTagCount.
size())
5005 ++m_colorTagCount.
top();
5012 if (m_colorTagCount.
size()) {
5013 if (!--m_colorTagCount.
top()) {
5015 m_colorTagCount.
pop();
5023 return m_colorStack.
top();
5028#ifndef QT_NO_CSSPARSER
5049#ifdef QT_NO_CSSPARSER
5058 while (
iter.hasNext()) {
5096 m_animEnd =
qMax(
end, m_animEnd);
5106#ifndef QT_NO_CSSPARSER
IOBluetoothDevice * device
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.
QByteArray & append(char c)
This is an overloaded member function, provided for convenience. It differs from the above function o...
static QByteArray fromRawData(const char *data, qsizetype size)
Constructs a QByteArray that uses the first size bytes of the data array.
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
static QString toNativeSeparators(const QString &pathName)
QFILE_MAYBE_NODISCARD 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 fill(T value)
Fills all elements of this matrix with value.
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.
QImage::Format imageFormat() const
@ Format_ARGB32_Premultiplied
static QImage fromData(QByteArrayView data, const char *format=nullptr)
\inmodule QtCore\compares equality \compareswith equality QLine \endcompareswith
qsizetype size() const noexcept
bool isEmpty() const noexcept
const_reference at(qsizetype i) const noexcept
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.
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
constexpr void setRect(qreal x, qreal y, qreal w, qreal h) noexcept
Sets the coordinates of the rectangle's top-left corner to (x, y), and its size to the given width an...
\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.
Q_CORE_EXPORT double toDouble(bool *ok=nullptr) const
Returns the string view converted to a double value.
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...
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 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.
\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.
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.
QString mid(qsizetype position, qsizetype n=-1) const &
bool isEmpty() const noexcept
Returns true if the string has no characters; otherwise returns false.
const QChar * constData() const
Returns a pointer to the data stored in the QString.
qsizetype size() const noexcept
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...
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.
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)
static const QSvgFeFilterPrimitive * castToFilterPrimitive(const QSvgNode *node)
void setFillRule(Qt::FillRule f)
void setFillOpacity(qreal opacity)
void setBrush(QBrush brush)
void setFillStyle(QSvgPaintStyleProperty *style)
void setPaintStyleResolved(bool resolved)
void setPaintStyleId(const QString &Id)
QSvgPaintStyleProperty * style() const
QSvgTinyDocument * doc() const
QSvgFont * svgFont() const
static constexpr qreal DEFAULT_UNITS_PER_EM
bool gradientStopsSet() const
void setStopLink(const QString &link, QSvgTinyDocument *doc)
QGradient * qgradient() const
void setGradientStopsSet(bool set)
QtSvg::Options options() const
QIODevice * device() const
QSvgTinyDocument * document() const
int animationDuration() const
QSvgHandler(QIODevice *device, QtSvg::Options options={})
void parseCSStoXMLAttrs(const QString &css, QList< QSvgCssAttribute > *attributes)
void setAnimPeriod(int start, int end)
QColor currentColor() const
LengthType defaultCoordinateSystem() const
bool processingInstruction(const QString &target, const QString &data)
bool trustedSourceMode() const
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 setMarkerMidId(const QString &str)
void setRequiredFeatures(const QStringList &lst)
void setMaskId(const QString &str)
void setXmlClass(const QString &str)
void setMarkerEndId(const QString &str)
bool isDescendantOf(const QSvgNode *parent) const
QSvgStyleProperty * styleProperty(QSvgStyleProperty::Type type) const
void setRequiredExtensions(const QStringList &lst)
void setMarkerStartId(const QString &str)
void setFilterId(const QString &str)
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 isPaintStyleResolved() const
QString paintStyleId() const
void setDashArray(const QList< qreal > &dashes)
void setMiterLimit(qreal limit)
QSvgPaintStyleProperty * style() const
void setStroke(QBrush brush)
void setPaintStyleResolved(bool resolved)
void setWidth(qreal width)
void setPaintStyleId(const QString &Id)
void setDashOffset(qreal offset)
void setLineCap(Qt::PenCapStyle cap)
void setVectorEffect(bool nonScalingStroke)
void setOpacity(qreal opacity)
void setStyle(QSvgPaintStyleProperty *style)
void setLineJoin(Qt::PenJoinStyle join)
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.
The QVector4D class represents a vector or vertex in 4D space.
constexpr void setZ(float z) noexcept
Sets the z coordinate of this point to the given finite z coordinate.
constexpr void setY(float y) noexcept
Sets the y coordinate of this point to the given finite y coordinate.
constexpr void setX(float x) noexcept
Sets the x coordinate of this point to the given finite x coordinate.
constexpr void setW(float w) noexcept
Sets the w coordinate of this point to the given finite w coordinate.
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)
SharedPointerFileDialogOptions m_options
QList< QString > QStringList
Constructs a string list that contains the given string, 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
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLboolean GLboolean GLboolean GLboolean a
[7]
GLuint GLfloat GLfloat GLfloat GLfloat y1
GLuint GLfloat GLfloat GLfloat x1
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLenum GLsizeiptr fontSize
GLsizei const GLfloat * dashArray
GLenum const void GLbitfield fontStyle
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLenum GLuint GLintptr offset
GLint GLint GLint GLint GLint GLint GLint GLbitfield mask
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
#define QStringLiteral(str)
bool(* ParseMethod)(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
static QSvgNode * createTspanNode(QSvgNode *parent, const QXmlStreamAttributes &, QSvgHandler *)
static void parseVisibility(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static bool detectPatternCycles(const QSvgNode *node, QList< const QSvgNode * > active={})
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 * createFeOffsetNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createFeMergeNodeNode(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 QSvgNode * createFeGaussianBlurNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static void parseOthers(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static bool parsePathDataFast(QStringView data, QPainterPath &path, bool limitLength=true)
static QSvgNode * createMaskNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static void parseRenderingHints(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static const int unfinishedElementsLimit
static void parseExtendedAttributes(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
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 QSvgNode * createPathNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
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 void cssStyleLookup(QSvgNode *node, QSvgHandler *handler, QSvgStyleSelector *selector, QXmlStreamAttributes &attributes)
static int parseClockValue(QStringView str, bool *ok)
static bool parseSymbolLikeAttributes(const QXmlStreamAttributes &attributes, QSvgHandler *handler, QRectF *rect, QRectF *viewBox, QPointF *refPoint, QSvgSymbolLike::PreserveAspectRatios *aspect, QSvgSymbolLike::Overflow *overflow, bool marker=false)
static bool parseFontFaceNameNode(QSvgStyleProperty *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
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 FactoryMethod findGraphicsFactory(const QString &name, QtSvg::Options options)
static QSvgNode * createFeColorMatrixNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
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 FactoryMethod findGroupFactory(const QString &name, QtSvg::Options options)
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 parseMarkerNode(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
static bool resolveColor(QStringView colorStr, QColor &color, QSvgHandler *handler)
static qreal parseLength(QStringView str, QSvgHandler::LengthType *type, QSvgHandler *handler, bool *ok=NULL)
static QList< qreal > parsePercentageList(const QChar *&str)
static QSvgNode * createFeCompositeNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
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 parseFilterAttributes(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler, QString *inString, QString *outString, QSvgRectF *rect)
static void parseOpacity(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *)
static bool parseScriptNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseFilterBounds(QSvgNode *, const QXmlStreamAttributes &attributes, QSvgHandler *handler, QSvgRectF *rect)
static QSvgNode * createPatternNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseHandlerNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QList< qreal > parseNumbersList(const QChar *&str)
static FactoryMethod findFilterFactory(const QString &name, QtSvg::Options options)
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 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 QSvgNode * createFeUnsupportedNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static bool parseForeignObjectNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static bool parseTbreakNode(QSvgNode *parent, const QXmlStreamAttributes &, QSvgHandler *)
static void parseFont(QSvgNode *node, const QSvgAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createFeFloodNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createRectNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
static QSvgNode * createMarkerNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
QSvgStyleProperty *(* StyleFactoryMethod)(QSvgNode *, const QXmlStreamAttributes &, QSvgHandler *)
static QSvgNode * createPolylineNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static QSvgNode * createFeMergeNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
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 parseMaskNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
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 bool detectCycles(const QSvgNode *node, QList< const QSvgNode * > active={})
static QStringList stringToList(const QString &str)
static QSvgNode * createSymbolNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
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 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 bool parseSetNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *)
static void parseNumberTriplet(QList< qreal > &values, const QChar *&s)
static QSvgNode * createFilterNode(QSvgNode *parent, const QXmlStreamAttributes &attributes, QSvgHandler *handler)
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 ParseMethod findUtilFactory(const QString &name, QtSvg::Options options)
Q_CORE_EXPORT bool qEnvironmentVariableIsSet(const char *varName) noexcept
static bool match(const uchar *found, uint foundLen, const char *target, uint targetLen)
static const uchar magic[MagicLength]
QList< QChar > characters
QFileSelector selector
[1]
QUrl url("example.com")
[constructor-url-reference]
QGraphicsEllipseItem * ellipse
scene addText("Hello, world!")
char * toString(const MyType &t)
[31]
QSvgRenderer * renderer
[0]
QExplicitlySharedDataPointer< DeclarationData > d
\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