6#include <QtQml/qqmlinfo.h>
7#include <QtQml/qqmlcontext.h>
11#include <QRandomGenerator>
40 if (m_source !=
arg) {
50void QQuickMaskExtruder::startMaskLoading()
63void QQuickMaskExtruder::finishMaskLoading()
76 return p +
r.topLeft();
91void QQuickMaskExtruder::ensureInitialized(
const QRectF &rf)
96 if (m_lastWidth ==
r.width() && m_lastHeight ==
r.height())
100 m_lastWidth =
r.width();
101 m_lastHeight =
r.height();
105 m_img = m_pix.
image();
113 int sy = (m_img.
height() << 16) /
r.height();
116 for (
int y=0;
y<
h; ++
y) {
118 for (
int x=0;
x<
w; ++
x) {
119 if (sl[(
x * sx) >> 16] & 0xff000000)
126#include "moc_qquickmaskextruder_p.cpp"
QRgb pixel(int x, int y) const
This is an overloaded member function, provided for convenience. It differs from the above function o...
int width() const
Returns the width of the image.
bool isNull() const
Returns true if it is a null image, otherwise returns false.
int height() const
Returns the height of the image.
@ Format_ARGB32_Premultiplied
Format format() const
Returns the format of the image.
const uchar * constScanLine(int) const
Returns a pointer to the pixel data at the scanline with index i.
QRect rect() const
Returns the enclosing rectangle (0, 0, width(), height()) of the image.
QImage convertToFormat(Format f, Qt::ImageConversionFlags flags=Qt::AutoColor) const &
qsizetype size() const noexcept
\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.
\inmodule QtCore\reentrant
The QQmlContext class defines a context within a QML engine.
QQuickMaskExtruder(QObject *parent=nullptr)
\qmltype MaskShape \instantiates QQuickMaskExtruder \inqmlmodule QtQuick.Particles \inherits Shape
QPointF extrude(const QRectF &) override
void setSource(const QUrl &arg)
void sourceChanged(const QUrl &arg)
bool contains(const QRectF &bounds, const QPointF &point) override
void load(QQmlEngine *, const QUrl &)
bool connectFinished(QObject *, const char *)
static Q_DECL_CONST_FUNCTION QRandomGenerator * global()
\threadsafe
double bounded(double highest)
Generates one random double in the range between 0 (inclusive) and highest (exclusive).
\inmodule QtCore\reentrant
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
constexpr QRect toRect() const noexcept
Returns a QRect based on the values of this rectangle.
\inmodule QtCore\reentrant
bool contains(const QRect &r, bool proper=false) const noexcept
This is an overloaded member function, provided for convenience. It differs from the above function o...
bool isEmpty() const
Returns true if the URL has no data; otherwise returns false.
Combined button and popup list for selecting options.
static void ensureInitialized()
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLfloat GLfloat GLfloat GLfloat h
QQmlContext * qmlContext(const QObject *obj)
Q_QML_EXPORT QQmlInfo qmlWarning(const QObject *me)
IUIAutomationTreeWalker __RPC__deref_out_opt IUIAutomationElement ** parent