4#ifndef QPAINTERPATH_P_H
5#define QPAINTERPATH_P_H
18#include <QtGui/private/qtguiglobal_p.h>
19#include "QtGui/qpainterpath.h"
20#include "QtGui/qregion.h"
21#include "QtCore/qlist.h"
22#include "QtCore/qshareddata.h"
23#include "QtCore/qvarlengtharray.h"
27#include <private/qvectorpath_p.h>
28#include <private/qstroker_p.h>
56 for (
int i=0;
i<
path.size(); ++
i) {
84 QVarLengthArray<QPainterPath::ElementType>
elements;
105#ifndef QT_NO_DATASTREAM
113 fillRule(
Qt::OddEvenFill),
114 require_moveTo(
false),
116 dirtyControlBounds(
false),
118 pathConverter(
nullptr)
127 bounds(startPoint,
QSizeF(0, 0)),
128 controlBounds(startPoint,
QSizeF(0, 0)),
129 require_moveTo(
false),
131 dirtyControlBounds(
false),
133 pathConverter(
nullptr)
140 cStart(
other.cStart),
141 fillRule(
other.fillRule),
142 bounds(
other.bounds),
143 controlBounds(
other.controlBounds),
144 require_moveTo(
false),
145 dirtyBounds(
other.dirtyBounds),
146 dirtyControlBounds(
other.dirtyControlBounds),
147 convex(
other.convex),
148 pathConverter(
nullptr)
155 inline bool isClosed()
const;
157 inline void maybeMoveTo();
163 return pathConverter->path;
167 QList<QPainterPath::Element>
elements;
175 uint require_moveTo : 1;
176 uint dirtyBounds : 1;
177 uint dirtyControlBounds : 1;
180 std::unique_ptr<QVectorPathConverter> pathConverter;
204 data->elements[0].type = m_elements[0];
205 for (
int i=1;
i<m_count; ++
i) {
207 element.
x = m_points[
index++];
208 element.
y = m_points[
index++];
209 element.
type = m_elements[
i];
210 data->elements << element;
214 for (
int i=1;
i<m_count; ++
i) {
216 element.
x = m_points[
index++];
217 element.
y = m_points[
index++];
219 data->elements << element;
243 require_moveTo =
true;
259 if (require_moveTo) {
263 require_moveTo =
false;
277 require_moveTo =
false;
279 dirtyControlBounds =
false;
282 pathConverter.reset();
284#define KAPPA qreal(0.5522847498)
\inmodule QtCore\reentrant
const_reference at(qsizetype i) const noexcept
void reserve(qsizetype size)
void append(parameter_type t)
friend struct QPainterPathPrivateDeleter
QPainterPathPrivate(QPointF startPoint)
friend Q_GUI_EXPORT QDataStream & operator<<(QDataStream &, const QPainterPath &)
QPainterPathPrivate(const QPainterPathPrivate &other) noexcept
QPainterPathPrivate & operator=(const QPainterPathPrivate &)=delete
const QVectorPath & vectorPath()
friend Q_GUI_EXPORT QDataStream & operator>>(QDataStream &, QPainterPath &)
~QPainterPathPrivate()=default
QPainterPathPrivate() noexcept
QPainterPathStrokerPrivate()
QList< qfixed > dashPattern
The QPainterPathStroker class is used to generate fillable outlines for a given painter path.
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.
The QPolygonF class provides a list of points using floating point precision.
\inmodule QtCore\reentrant
QVectorPathConverter(const QList< QPainterPath::Element > &path, uint fillRule, bool convex)
const QVectorPath & vectorPath()
const QPainterPath convertToPainterPath() const
Combined button and popup list for selecting options.
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum GLuint GLenum GLsizei length
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfixed GLfixed GLint GLint GLfixed points
GLsizei const GLchar *const * path
void Q_GUI_EXPORT qt_find_ellipse_coords(const QRectF &r, qreal angle, qreal length, QPointF *startPoint, QPointF *endPoint)
static const QTextHtmlElement elements[Html_NumElements]
QVectorPathData(const QList< QPainterPath::Element > &path, uint fillRule, bool convex)
QVarLengthArray< QPainterPath::ElementType > elements
QVarLengthArray< qreal > points