4#ifndef QQUICKSHAPECURVENODE_P_H
5#define QQUICKSHAPECURVENODE_P_H
7#include <QtQuick/qsgnode.h>
55 m_strokeWidth =
width;
72 return m_fillGradient;
77 if (m_gradientType !=
type) {
78 m_gradientType =
type;
85 return m_gradientType;
90 return m_strokeWidth > 0.0f && m_strokeColor.
alpha() > 0;
108 m_uncookedIndexes.append(m_uncookedVertexes.size());
109 m_uncookedVertexes.append( {
v1.x(),
v1.y(),
110 uv1.
x(), uv1.
y(), uv1.
z(),
111 debugColor1.
x(), debugColor1.
y(), debugColor1.
z(), debugColor1.
w(),
112 duvdx.
x(), duvdx.
y(),
116 m_uncookedIndexes.append(m_uncookedVertexes.size());
117 m_uncookedVertexes.append( {
v2.x(),
v2.y(),
118 uv2.
x(), uv2.
y(), uv2.
z(),
119 debugColor2.
x(), debugColor2.
y(), debugColor2.
z(), debugColor2.
w(),
120 duvdx.
x(), duvdx.
y(),
124 m_uncookedIndexes.append(m_uncookedVertexes.size());
125 m_uncookedVertexes.append( {
v3.x(),
v3.y(),
126 uv3.
x(), uv3.
y(), uv3.
z(),
127 debugColor3.
x(), debugColor3.
y(), debugColor3.
z(), debugColor3.
w(),
128 duvdx.
x(), duvdx.
y(),
142 m_uncookedVertexes.append( { vertex.
x(), vertex.
y(),
143 uv.
x(), uv.
y(), uv.
z(),
144 debugColor.
x(), debugColor.
y(), debugColor.
z(), debugColor.
w(),
145 duvdx.
x(), duvdx.
y(),
153 m_uncookedIndexes.append(
index);
158 m_uncookedIndexes.append(indexes);
163 return m_uncookedIndexes;
169 struct CurveNodeVertex
173 float dudx, dvdx, dudy, dvdy;
176 void updateMaterial();
181 float m_strokeWidth = 0.0f;
The QColor class provides colors based on RGB, HSV or CMYK values.
int alpha() const noexcept
Returns the alpha color component of this color.
void setFillGradient(const QQuickAbstractPathRenderer::GradientDesc &fillGradient)
void appendVertex(const QVector2D &vertex, std::function< QVector3D(QVector2D)> uvForPoint, const QVector4D &debugColor)
QVector< quint32 > uncookedIndexes() const
void setStrokeColor(QColor col)
QQuickAbstractPathRenderer::FillGradientType gradientType() const
void setColor(QColor col)
void appendTriangle(const QVector2D &v1, const QVector2D &v2, const QVector2D &v3, std::function< QVector3D(QVector2D)> uvForPoint, QVector4D debugColor1, QVector4D debugColor2, QVector4D debugColor3)
QQuickAbstractPathRenderer::GradientDesc fillGradient() const
void appendIndexes(QVector< quint32 > indexes)
float strokeWidth() const
QColor strokeColor() const
void appendIndex(quint32 index)
void setGradientType(QQuickAbstractPathRenderer::FillGradientType type)
void setStrokeWidth(float width)
The QSGGeometryNode class is used for all rendered content in the scene graph.
NodeType type() const
Returns the type of this node.
The QVector2D class represents a vector or vertex in 2D space.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float x() const noexcept
Returns the x coordinate of this point.
The QVector3D class represents a vector or vertex in 3D space.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float x() const noexcept
Returns the x coordinate of this point.
constexpr float z() const noexcept
Returns the z coordinate of this point.
The QVector4D class represents a vector or vertex in 4D space.
constexpr float x() const noexcept
Returns the x coordinate of this point.
constexpr float w() const noexcept
Returns the w coordinate of this point.
constexpr float y() const noexcept
Returns the y coordinate of this point.
constexpr float z() const noexcept
Returns the z coordinate of this point.
Combined button and popup list for selecting options.
GLint GLfloat GLfloat GLfloat v2
GLboolean GLboolean GLboolean b
GLsizei const GLfloat * v
[13]
GLint GLint GLint GLint GLint x
[0]
GLfloat GLfloat GLfloat w
[0]
GLboolean GLboolean GLboolean GLboolean a
[7]
GLint GLfloat GLfloat GLfloat GLfloat v3
static QVector2D uvForPoint(QVector2D v1, QVector2D v2, QVector2D p)
The QSGGeometry::AttributeSet describes how the vertices in a QSGGeometry are built up.