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
qquickstarshape_p_p.h
Go to the documentation of this file.
1// Copyright (C) 2025 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
4#ifndef QQUICKSTARSHAPE_P_P_H
5#define QQUICKSTARSHAPE_P_P_H
6
8#include <QtQml/private/qqmlpropertyutils_p.h>
9#include <QtQuickShapes/private/qquickshape_p_p.h>
10#include <qpoint.h>
11#include <qvectornd.h>
12#include <vector>
13
14//
15// W A R N I N G
16// -------------
17//
18// This file is not part of the Qt API. It exists purely as an
19// implementation detail. This header file may change from version to
20// version without notice, or even be removed.
21//
22// We mean it.
23//
24
26
28{
29 Q_DECLARE_PUBLIC(QQuickStarShape)
30
31public:
32 QQuickStarShapePrivate();
33 ~QQuickStarShapePrivate() override;
34
35 void updatePath();
36 void updatePoints();
37 void constructPolygonPath();
38 void constructRoundedPolygonPath();
39
40 qreal cornerRadius = 10;
41 int pointCount = 6;
42 qreal ratio = 0.5;
43
44 std::vector<QVector2D> points;
45
46 QQuickShapePath *path = nullptr;
47};
48
49QT_END_NAMESPACE
50
51#endif // QQUICKSTARSHAPE_P_P_H
The QVector2D class represents a vector or vertex in 2D space.
Definition qvectornd.h:31
constexpr float y() const noexcept
Returns the y coordinate of this point.
Definition qvectornd.h:502
QVector2D normalized() const noexcept
Returns the normalized unit vector form of this vector.
Definition qvectornd.h:529
constexpr float x() const noexcept
Returns the x coordinate of this point.
Definition qvectornd.h:501
static constexpr float dotProduct(QVector2D v1, QVector2D v2) noexcept
Returns the dot product of v1 and v2.
Definition qvectornd.h:604