25 markDirty(DirtyMaterial);
32 markDirty(DirtyMaterial);
40 markDirty(DirtyMaterial);
48 markDirty(DirtyMaterial);
54 if (m_spriteSize !=
size) {
56 markDirty(DirtyMaterial);
62 if (m_sheetSize !=
size) {
64 markDirty(DirtyMaterial);
72 markDirty(DirtyGeometry);
91 QRectF sourceRect(m_sourceA, m_spriteSize);
94 VGImage sourceImage = vgChildImage(
image, sourceRect.
x(), sourceRect.
y(), sourceRect.
width(), sourceRect.
height());
100 vgSeti(VG_IMAGE_MODE, VG_DRAW_IMAGE_MULTIPLY);
102 vgSeti(VG_IMAGE_MODE, VG_DRAW_IMAGE_NORMAL);
106 vgSeti(VG_MATRIX_MODE, VG_MATRIX_IMAGE_USER_TO_SURFACE);
109 if (sourceRect != targetRect) {
111 float scaleX = targetRect.
width() / sourceRect.
width();
112 float scaleY = targetRect.
height() / sourceRect.
height();
113 vgScale(scaleX, scaleY);
116 vgDrawImage(sourceImage);
118 vgDestroyImage(sourceImage);
\inmodule QtCore\reentrant
\inmodule QtCore\reentrant
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.
The QSGGeometry class provides low-level storage for graphics primitives in the \l{Qt Quick Scene Gra...
The QSGMaterial class encapsulates rendering state for a shader program.
VGPaint opacityPaint() const
const QOpenVGMatrix & transform() const
void setTexture(QSGTexture *texture) override
void setSize(const QSizeF &size) override
void setSourceA(const QPoint &source) override
void setSheetSize(const QSize &size) override
void setSourceB(const QPoint &source) override
void setFiltering(QSGTexture::Filtering filtering) override
void setTime(float time) override
void setSpriteSize(const QSize &size) override
qint64 comparisonKey() const override
Returns a key suitable for comparing textures.
Filtering
Specifies how sampling of texels should filter when texture coordinates are not pixel aligned.
constexpr qreal width() const noexcept
Returns the width.
constexpr qreal height() const noexcept
Returns the height.
Combined button and popup list for selecting options.
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLsizei GLsizei GLchar * source