18#include <QtGui/private/qtguiglobal_p.h>
19#include <QtGui/qpaintengine.h>
21#include <private/qpaintengine_p.h>
22#include <private/qstroker_p.h>
23#include <private/qpainter_p.h>
42 AreaShapeMask = 0x0001,
43 NonConvexShapeMask = 0x0002,
44 CurvedShapeMask = 0x0004,
45 LinesShapeMask = 0x0008,
46 RectangleShapeMask = 0x0010,
50 LinesHint = LinesShapeMask,
51 RectangleHint = AreaShapeMask | RectangleShapeMask,
52 EllipseHint = AreaShapeMask | CurvedShapeMask,
53 ConvexPolygonHint = AreaShapeMask,
54 PolygonHint = AreaShapeMask | NonConvexShapeMask,
55 RoundedRectHint = AreaShapeMask | CurvedShapeMask,
56 ArbitraryShapeHint = AreaShapeMask | NonConvexShapeMask | CurvedShapeMask,
59 IsCachedHint = 0x0100,
60 ShouldUseCacheHint = 0x0200,
61 ControlPointRect = 0x0400,
66 ImplicitClose = 0x4000,
74 uint hints = ArbitraryShapeHint)
84 QRectF controlPointRect()
const;
87 inline bool isConvex()
const {
return (m_hints & NonConvexShapeMask) == 0; }
88 inline bool isCurved()
const {
return m_hints & CurvedShapeMask; }
90 inline bool isCacheable()
const {
return m_hints & ShouldUseCacheHint; }
95 inline void makeCacheable()
const { m_hints |= ShouldUseCacheHint; m_cache =
nullptr; }
100 inline bool isEmpty()
const {
return m_points ==
nullptr; }
125 Q_ASSERT(m_hints & ShouldUseCacheHint);
135 template <
typename T>
static inline bool isRect(
const T *pts,
int elementCount) {
136 return (elementCount == 5
137 && pts[0] == pts[8] && pts[1] == pts[9]
138 && pts[0] == pts[6] && pts[2] == pts[4]
139 && pts[1] == pts[3] && pts[5] == pts[7]
140 && pts[0] < pts[4] && pts[1] < pts[5]
143 && pts[0] == pts[6] && pts[2] == pts[4]
144 && pts[1] == pts[3] && pts[5] == pts[7]
145 && pts[0] < pts[4] && pts[1] < pts[5]
154 || (isRect(
points(), elementCount())
166 const qreal *m_points;
169 mutable uint m_hints;
172 mutable CacheEntry *m_cache;
PolygonDrawMode
\value OddEvenMode The polygon should be drawn using OddEven fill rule.
ElementType
This enum describes the types of elements used to connect vertices in subpaths.
\inmodule QtCore\reentrant
QVectorPath(const qreal *points, int count, const QPainterPath::ElementType *elements=nullptr, uint hints=ArbitraryShapeHint)
static bool isRect(const T *pts, int elementCount)
static uint polygonFlags(QPaintEngine::PolygonDrawMode mode)
const QPainterPath::ElementType * elements() const
void makeCacheable() const
bool hasWindingFill() const
bool hasImplicitClose() const
const qreal * points() const
CacheEntry * lookupCacheData(QPaintEngineEx *engine) const
bool hasExplicitOpen() const
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
GLsizei GLenum GLenum * types
GLenum GLenum GLsizei count
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLfixed GLfixed GLint GLint GLfixed points
GLsizei const GLchar *const * path
static const QTextHtmlElement elements[Html_NumElements]
Q_GUI_EXPORT const QVectorPath & qtVectorPathForPath(const QPainterPath &path)
void(* qvectorpath_cache_cleanup)(QPaintEngineEx *engine, void *data)
qvectorpath_cache_cleanup cleanup