6#include <private/qbezier_p.h>
13 vertexArrayStops.
reset();
14 boundingRectDirty =
true;
20 if (boundingRectDirty)
26void QOpenGL2PEXVertexArray::addClosingLine(
int index)
30 vertexArray.
add(point);
33void QOpenGL2PEXVertexArray::addCentroid(
const QVectorPath &
path,
int subPathIndex)
47 vertexArray.
add(centroid);
55 if (boundingRectDirty) {
58 boundingRectDirty =
false;
61 if (!outline && !
path.isConvex())
64 int lastMoveTo = vertexArray.
size();
72 for (
int i=1;
i<
path.elementCount(); ++
i)
79 for (
int i=1;
i<
path.elementCount(); ++
i) {
83 addClosingLine(lastMoveTo);
85 vertexArrayStops.
add(vertexArray.
size());
87 if (!
path.isConvex()) addCentroid(
path,
i);
88 lastMoveTo = vertexArray.
size();
103 int threshold = qMin<float>(64,
qMax(bounds.
width(), bounds.
height()) * 3.14f / (curveInverseScale * 6));
104 if (threshold < 3) threshold = 3;
105 qreal one_over_threshold_minus_1 =
qreal(1) / (threshold - 1);
106 for (
int t=0;
t<threshold; ++
t) {
107 QPointF pt =
b.pointAt(
t * one_over_threshold_minus_1);
119 addClosingLine(lastMoveTo);
120 vertexArrayStops.
add(vertexArray.
size());
static QBezier fromPoints(const QPointF &p1, const QPointF &p2, const QPointF &p3, const QPointF &p4)
void addPath(const QVectorPath &path, GLfloat curveInverseScale, bool outline=true)
void lineToArray(const GLfloat x, const GLfloat y)
QOpenGLRect boundingRect() const
ElementType
This enum describes the types of elements used to connect vertices in subpaths.
\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
constexpr qreal height() const noexcept
Returns the height of the rectangle.
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Combined button and popup list for selecting options.
constexpr const T & qMax(const T &a, const T &b)
GLboolean GLboolean GLboolean b
GLint GLint GLint GLint GLint x
[0]
typedef GLfloat(GL_APIENTRYP PFNGLGETPATHLENGTHNVPROC)(GLuint path
GLfloat GLfloat GLfloat GLfloat GLfloat maxY
GLenum GLenum GLsizei count
GLfloat GLfloat GLfloat GLfloat maxX
GLfixed GLfixed GLint GLint GLfixed points
GLsizei const GLchar *const * path
static const QTextHtmlElement elements[Html_NumElements]