18#include <private/qquicktranslate_p.h>
19#include <private/qquickitem_p.h>
20#include <private/qsvgnode_p.h>
22#include <private/qquadpath_p.h>
23#include <private/qsvgvisitor_p.h>
45 xformProp.clear(&xformProp);
49 tr->setX(-m_viewBox.
x());
50 tr->setY(-m_viewBox.
y());
51 xformProp.append(&xformProp,
tr);
60 xformProp.append(&xformProp,
scale);
72 for (
const auto &
p : poly) {
88 auto flags = qp.pathHints();
94#define CHECK_PATH_HINT(flagName) \
95 if (flags.testFlag(QQuadPath::flagName)) { \
99 str << " ShapePath." #flagName; \
128 if (pixelRect.isEmpty())
133 double objModeSlope = objModeRect.height() / objModeRect.width();
134 double a = objModeSlope *
w /
h;
137 double x2 = pixelRect.width();
138 double y2 = pixelRect.height();
139 double x = (
x2 +
a *
y2) / (1 +
a *
a);
150 for (
int i = 0;
i <
path.elementCount(); ++
i) {
153 strm <<
"M " << element.
x <<
" " << element.
y <<
" ";
155 strm <<
"L " << element.
x <<
" " << element.
y <<
" ";
159 element =
path.elementAt(
i);
163 element =
path.elementAt(
i);
176 return svgPathString;
193 return svgPathString;
199 switch (strokeCapStyle) {
220 switch (strokeJoinStyle) {
bool isEmpty() const noexcept
qsizetype length() const noexcept
bool isMoveTo() const
Returns true if the element is moving the current position, otherwise returns false.
bool isCurveTo() const
Returns true if the element is a curve, otherwise returns false.
bool isLineTo() const
Returns true if the element is a line, otherwise returns false.
\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.
bool isSubpathStart() const
QVector2D startPoint() const
QVector2D endPoint() const
QVector2D controlPoint() const
The QQuickItem class provides the most basic of all visual items in \l {Qt Quick}.
qreal width
This property holds the width of this item.
QQuickItem * parent
\qmlproperty Item QtQuick::Item::parent This property holds the visual parent of the item.
qreal height
This property holds the height of this item.
QQmlListProperty< QQuickTransform > transform
\qmlproperty list<Transform> QtQuick::Item::transform This property holds the list of transformations...
ViewBoxItem(const QRectF viewBox, QQuickItem *parent=nullptr)
void geometryChange(const QRectF &, const QRectF &) override
\inmodule QtCore\reentrant
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
constexpr qreal y() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr qreal x() const noexcept
Returns the x-coordinate of the rectangle's left edge.
\inmodule QtCore\reentrant
\macro QT_RESTRICTED_CAST_FROM_ASCII
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float x() const noexcept
Returns the x coordinate of this point.
QPainterPath polygonToPath(const QPolygonF &poly, bool closed)
QString strokeJoinStyleString(Qt::PenJoinStyle strokeJoinStyle)
QString strokeCapStyleString(Qt::PenCapStyle strokeCapStyle)
QRectF mapToQtLogicalMode(const QRectF &objModeRect, const QRectF &boundingRect)
QString listString(QList< T > list)
QString pathHintString(const QQuadPath &qp)
QString toSvgString(const QPainterPath &path)
Combined button and popup list for selecting options.
bool qFuzzyIsNull(qfloat16 f) noexcept
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLfloat GLfloat GLfloat GLfloat h
GLfixed GLfixed GLfixed y2
GLsizei const GLchar *const * path
GLenum GLenum GLenum GLenum GLenum scale
static const QRectF boundingRect(const QPointF *points, int pointCount)
#define QStringLiteral(str)
static bool translate(xcb_connection_t *connection, xcb_window_t child, xcb_window_t parent, int *x, int *y)
#define CHECK_PATH_HINT(flagName)