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