Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsvgutils_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3// Qt-Security score:significant reason:default
4
5
6#ifndef QSVGUTILS_P_H
7#define QSVGUTILS_P_H
8
9//
10// W A R N I N G
11// -------------
12//
13// This file is not part of the Qt API. It exists purely as an
14// implementation detail. This header file may change from version to
15// version without notice, or even be removed.
16//
17// We mean it.
18//
19
20#include <QString>
21#include <QtGui/qpainterpath.h>
22#include <optional>
23
25
26namespace QSvgUtils {
27
38
39bool isDigit(ushort ch);
40qreal toDouble(const QChar *&str);
41qreal toDouble(QStringView str, bool *ok = NULL);
42qreal parseLength(QStringView str, LengthType *type, bool *ok = NULL);
43qreal convertToPixels(qreal len, bool , LengthType type);
44std::optional<qreal> parseAngle(QStringView str);
45void parseNumbersArray(const QChar *&str, QVarLengthArray<qreal, 8> &points,
46 const char *pattern = nullptr);
47std::optional<QPainterPath> parsePathDataFast(QStringView dataStr, bool limitLength = true);
48
49}
50
51QT_END_NAMESPACE
52
53#endif // QSVGUTILS_P_H
friend class QPainter
QRectF decoratedInternalBounds(QPainter *p, QSvgExtraStates &states) const override
QSvgNode * link() const
void setLink(QSvgNode *link)
void drawCommand(QPainter *p, QSvgExtraStates &states) override
bool isResolved() const
QRectF internalBounds(QPainter *p, QSvgExtraStates &states) const override
bool isRecursing() const
QPointF start() const
const QString & linkId() const
QSvgUse(const QPointF &start, QSvgNode *parent, QSvgNode *link)
Type type() const override
void drawCommand(QPainter *, QSvgExtraStates &) override
Type type() const override
bool isDigit(ushort ch)
qreal toDouble(const QChar *&str)
void parseNumbersArray(const QChar *&str, QVarLengthArray< qreal, 8 > &points, const char *pattern)
std::optional< qreal > parseAngle(QStringView str)
qreal convertToPixels(qreal len, bool, LengthType type)
qreal toDouble(QStringView str, bool *ok)
qreal parseLength(QStringView str, LengthType *type, bool *ok)
std::optional< QPainterPath > parsePathDataFast(QStringView dataStr, bool limitLength)
Combined button and popup list for selecting options.
@ AssumeTrustedSource
Definition qtsvgglobal.h:20
@ DisableSMILAnimations
Definition qtsvgglobal.h:23
@ DisableCSSAnimations
Definition qtsvgglobal.h:24
@ Tiny12FeaturesOnly
Definition qtsvgglobal.h:19
@ NoOption
Definition qtsvgglobal.h:18
@ DisableAnimations
Definition qtsvgglobal.h:27
Q_CORE_EXPORT QDebug operator<<(QDebug debug, QDir::Filters filters)
Definition qdir.cpp:2582
#define qPrintable(string)
Definition qstring.h:1683
static QByteArray qt_inflateSvgzDataFrom(QIODevice *device, bool doCheckContent=true)
static bool isValidMatrix(const QTransform &transform)
static bool hasSvgHeader(const QByteArray &buf)