Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qquicklineextruder.cpp
Go to the documentation of this file.
1// Copyright (C) 2016 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
4#include <QRandomGenerator>
5#include <cmath>
6
31
33{
34 qreal x,y;
35 if (!r.height()){
36 x = r.width() * QRandomGenerator::global()->generateDouble();
37 y = 0;
38 }else{
39 y = r.height() * QRandomGenerator::global()->generateDouble();
40 if (!r.width()){
41 x = 0;
42 }else{
43 x = r.width()/r.height() * y;
44 if (m_mirrored)
45 x = r.width() - x;
46 }
47 }
48 return QPointF(x,y);
49}
50
51#include "moc_qquicklineextruder_p.cpp"
\inmodule QtCore
Definition qobject.h:103
\inmodule QtCore\reentrant
Definition qpoint.h:217
QQuickLineExtruder(QObject *parent=nullptr)
\qmltype LineShape \instantiates QQuickLineExtruder \inqmlmodule QtQuick.Particles \inherits Particle...
QPointF extrude(const QRectF &) override
static Q_DECL_CONST_FUNCTION QRandomGenerator * global()
\threadsafe
Definition qrandom.h:275
\inmodule QtCore\reentrant
Definition qrect.h:484
GLint GLint GLint GLint GLint x
[0]
GLboolean r
[2]
GLint y
double qreal
Definition qtypes.h:187