Move QVectorPath::polygonFlags to its own class.
Who can say why it was put in QPaintEngineEx's header, but it certainly doesn't belong there. Change-Id: Ieb3b977affcf4b240f621d13b72bdc0e8f8138b9 Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>bb10
parent
517240096b
commit
7e74236477
|
|
@ -204,16 +204,6 @@ public:
|
|||
QRect exDeviceRect;
|
||||
};
|
||||
|
||||
inline uint QVectorPath::polygonFlags(QPaintEngine::PolygonDrawMode mode) {
|
||||
switch (mode) {
|
||||
case QPaintEngine::ConvexMode: return ConvexPolygonHint | ImplicitClose;
|
||||
case QPaintEngine::OddEvenMode: return PolygonHint | OddEvenFill | ImplicitClose;
|
||||
case QPaintEngine::WindingMode: return PolygonHint | WindingFill | ImplicitClose;
|
||||
case QPaintEngine::PolylineMode: return PolygonHint;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
QT_END_NAMESPACE
|
||||
|
||||
QT_END_HEADER
|
||||
|
|
|
|||
|
|
@ -139,7 +139,16 @@ public:
|
|||
inline int elementCount() const { return m_count; }
|
||||
inline const QPainterPath convertToPainterPath() const;
|
||||
|
||||
static inline uint polygonFlags(QPaintEngine::PolygonDrawMode mode);
|
||||
static inline uint polygonFlags(QPaintEngine::PolygonDrawMode mode)
|
||||
{
|
||||
switch (mode) {
|
||||
case QPaintEngine::ConvexMode: return ConvexPolygonHint | ImplicitClose;
|
||||
case QPaintEngine::OddEvenMode: return PolygonHint | OddEvenFill | ImplicitClose;
|
||||
case QPaintEngine::WindingMode: return PolygonHint | WindingFill | ImplicitClose;
|
||||
case QPaintEngine::PolylineMode: return PolygonHint;
|
||||
default: return 0;
|
||||
}
|
||||
}
|
||||
|
||||
struct CacheEntry {
|
||||
QPaintEngineEx *engine;
|
||||
|
|
|
|||
Loading…
Reference in New Issue