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
qquickninepatchimage_p.h
Go to the documentation of this file.
1// Copyright (C) 2022 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#ifndef QQUICKNINEPATCHIMAGE_P_H
6#define QQUICKNINEPATCHIMAGE_P_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QtQuick/private/qquickimage_p.h>
20
21QT_BEGIN_NAMESPACE
22
23class QQuickNinePatchImagePrivate;
24
26{
27 Q_OBJECT
28 Q_PROPERTY(qreal topPadding READ topPadding NOTIFY topPaddingChanged FINAL)
38
39public:
40 explicit QQuickNinePatchImage(QQuickItem *parent = nullptr);
41
42 qreal topPadding() const;
43 qreal leftPadding() const;
44 qreal rightPadding() const;
45 qreal bottomPadding() const;
46
47 qreal topInset() const;
48 qreal leftInset() const;
49 qreal rightInset() const;
50 qreal bottomInset() const;
51
57
62
63protected:
65 QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override;
66
67private:
70};
71
72QT_END_NAMESPACE
73
74#endif // QQUICKNINEPATCHIMAGE_P_H
void updatePaddings(const QSizeF &size, const QList< qreal > &horizontal, const QList< qreal > &vertical)
void updateInsets(const QList< qreal > &horizontal, const QList< qreal > &vertical)
QSGNode * updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) override
Called on the render thread when it is time to sync the state of the item with the scene graph.
void initialize(QSGTexture *texture, const QSizeF &targetSize, const QSize &sourceSize, const QQuickNinePatchData &xDivs, const QQuickNinePatchData &yDivs, qreal dpr)
static QList< qreal > readCoords(const QRgb *data, int from, int count, int offset, QRgb color)
QList< qreal > coordsForSize(qreal count) const
void fill(const QList< qreal > &coords, qreal count)
qreal at(int index) const