44 if (padding.
x() <= 0 && padding.
y() <= 0 && padding.
z() <= 0 && padding.
w() <= 0) {
59 Coord cx[4] = { { bounds.
left(),
tc.left() },
60 { bounds.
left() + padding.
x(),
tc.left() + padding.
x() * invtw },
61 { bounds.
right() - padding.
z(),
tc.right() - padding.
z() * invtw },
64 Coord cy[4] = { { bounds.
top(),
tc.top() },
65 { bounds.
top() + padding.
y(),
tc.top() + padding.
y() * invth },
66 { bounds.
bottom() - padding.
w(),
tc.bottom() - padding.
w() * invth },
72 for (
int y = 0;
y < 4; ++
y) {
73 for (
int x = 0;
x < 4; ++
x) {
80 for (
int r = 0;
r < 3; ++
r) {
83 for (
int c = 0;
c < 4; ++
c) {
\inmodule QtCore\reentrant
constexpr qreal bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
constexpr qreal left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
constexpr qreal top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
constexpr qreal right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
const QSGGeometry * geometry() const
Returns this node's geometry.
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
TexturedPoint2D * vertexDataAsTexturedPoint2D()
Convenience function to access the vertex data as a mutable array of QSGGeometry::TexturedPoint2D.
static void updateTexturedRectGeometry(QSGGeometry *g, const QRectF &rect, const QRectF &sourceRect)
Updates the geometry g with the coordinates in rect and texture coordinates from textureRect.
void allocate(int vertexCount, int indexCount=0)
Resizes the vertex and index data of this geometry object to fit vertexCount vertices and indexCount ...
quint16 * indexDataAsUShort()
Convenience function to access the index data as a mutable array of 16-bit unsigned integers.
static void rebuildGeometry(QSGTexture *texture, QSGGeometry *geometry, const QVector4D &padding, const QRectF &bounds, qreal dpr)
constexpr int height() const noexcept
Returns the height.
constexpr int width() const noexcept
Returns the width.
constexpr void setWidth(int w) noexcept
Sets the width to the given width.
constexpr void setHeight(int h) noexcept
Sets the height to the given height.
The QVector4D class represents a vector or vertex in 4D space.
constexpr float x() const noexcept
Returns the x coordinate of this point.
constexpr float w() const noexcept
Returns the w coordinate of this point.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float z() const noexcept
Returns the z coordinate of this point.
Combined button and popup list for selecting options.
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
static QT_BEGIN_NAMESPACE qreal dpr(const QWindow *w)
The QSGGeometry::TexturedPoint2D struct is a convenience struct for accessing 2D Points with texture ...
void set(float nx, float ny, float ntx, float nty)
Sets the position of the vertex to x and y and the texture coordinate to tx and ty.