42 #ifndef QPAINTERPATH_P_H 43 #define QPAINTERPATH_P_H 56 #include "QtGui/qpainterpath.h" 57 #include "QtGui/qregion.h" 58 #include "QtCore/qlist.h" 59 #include "QtCore/qvarlengtharray.h" 63 #include <private/qvectorpath_p.h> 64 #include <private/qstroker_p.h> 85 : pathData(path, fillRule, convex),
86 path(pathData.points.
data(), path.size(),
96 points(path.size() * 2),
101 for (
int i=0; i<path.
size(); ++i) {
104 points[ptsPos++] = e.
x;
105 points[ptsPos++] = e.
y;
148 dirtyControlBounds(false),
152 require_moveTo =
false;
158 bounds(other.bounds),
159 controlBounds(other.controlBounds),
160 dirtyBounds(other.dirtyBounds),
161 dirtyControlBounds(other.dirtyControlBounds),
162 convex(other.convex),
166 require_moveTo =
false;
171 delete pathConverter;
174 inline bool isClosed()
const;
176 inline void maybeMoveTo();
181 return pathConverter->path;
204 data->elements.reserve(m_count);
206 data->elements[0].x = m_points[index++];
207 data->elements[0].y = m_points[index++];
210 data->elements[0].type = m_elements[0];
211 for (
int i=1; i<m_count; ++i) {
213 element.
x = m_points[index++];
214 element.
y = m_points[index++];
215 element.
type = m_elements[i];
216 data->elements << element;
220 for (
int i=1; i<m_count; ++i) {
222 element.
x = m_points[index++];
223 element.
y = m_points[index++];
225 data->elements << element;
243 return first.
x == last.
x && first.
y == last.
y;
249 require_moveTo =
true;
252 if (first.
x != last.
x || first.
y != last.
y) {
265 if (require_moveTo) {
269 require_moveTo =
false;
273 #define KAPPA qreal(0.5522847498) 278 #endif // QPAINTERPATH_P_H ElementType type
the type of element
The QPainterPath::Element class specifies the position and type of a subpath.
ElementType
This enum describes the types of elements used to connect vertices in subpaths.
QVarLengthArray< QPainterPath::ElementType > elements
#define QT_END_NAMESPACE
This macro expands to.
The QPainterPath class provides a container for painting operations, enabling graphical shapes to be ...
QVectorPathConverter * pathConverter
const QVectorPath & vectorPath()
The QPointF class defines a point in the plane using floating point precision.
static Q_DECL_CONSTEXPR bool qFuzzyCompare(double p1, double p2)
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
qreal y
the y coordinate of the element's position.
QVector< qfixed > dashPattern
#define QT_BEGIN_NAMESPACE
This macro expands to.
QPainterPathStrokerPrivate()
The QRectF class defines a rectangle in the plane using floating point precision. ...
QVarLengthArray< qreal > points
QPainterPathData * d_func() const
QPainterPathData(const QPainterPathData &other)
The QPolygonF class provides a vector of points using floating point precision.
static const char * data(const QByteArray &arr)
const QVectorPath & vectorPath()
QVectorPathData(const QVector< QPainterPath::Element > &path, uint fillRule, bool convex)
const QPainterPath convertToPainterPath() const
const T & at(int i) const
Returns the item at index position i in the vector.
qreal angle(const QPointF &p1, const QPointF &p2)
qreal x
the x coordinate of the element's position.
static const QTextHtmlElement elements[Html_NumElements]
QVectorPathConverter(const QVector< QPainterPath::Element > &path, uint fillRule, bool convex)
int size() const
Returns the number of items in the vector.
void Q_GUI_EXPORT qt_find_ellipse_coords(const QRectF &r, qreal angle, qreal length, QPointF *startPoint, QPointF *endPoint)