Changeset 561 for trunk/src/gui/painting/qpaintengineex_p.h
- Timestamp:
- Feb 11, 2010, 11:19:06 PM (15 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk
-
Property svn:mergeinfo
set to (toggle deleted branches)
/branches/vendor/nokia/qt/4.6.1 merged eligible /branches/vendor/nokia/qt/current merged eligible /branches/vendor/trolltech/qt/current 3-149
-
Property svn:mergeinfo
set to (toggle deleted branches)
-
trunk/src/gui/painting/qpaintengineex_p.h
r2 r561 2 2 ** 3 3 ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). 4 ** Contact: Qt Software Information (qt-info@nokia.com) 4 ** All rights reserved. 5 ** Contact: Nokia Corporation (qt-info@nokia.com) 5 6 ** 6 7 ** This file is part of the QtGui module of the Qt Toolkit. … … 21 22 ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. 22 23 ** 23 ** In addition, as a special exception, Nokia gives you certain 24 ** additional rights. These rights are described in the Nokia Qt LGPL 25 ** Exception version 1.0, included in the file LGPL_EXCEPTION.txt in this 26 ** package. 24 ** In addition, as a special exception, Nokia gives you certain additional 25 ** rights. These rights are described in the Nokia Qt LGPL Exception 26 ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. 27 27 ** 28 28 ** GNU General Public License Usage … … 34 34 ** met: http://www.gnu.org/copyleft/gpl.html. 35 35 ** 36 ** If you are unsure which license is appropriate for your use, please37 ** contact the sales department at qt-sales@nokia.com.36 ** If you have questions regarding the use of this file, please contact 37 ** Nokia at qt-info@nokia.com. 38 38 ** $QT_END_LICENSE$ 39 39 ** … … 55 55 56 56 #include <QtGui/qpaintengine.h> 57 58 #include "qpaintengine_p.h" 59 #include "qstroker_p.h" 60 #include "qpainter_p.h" 61 #include "qvectorpath_p.h" 57 #include <QtGui/qdrawutil.h> 58 59 #include <private/qpaintengine_p.h> 60 #include <private/qstroker_p.h> 61 #include <private/qpainter_p.h> 62 #include <private/qvectorpath_p.h> 62 63 63 64 … … 71 72 class QPaintEngineExPrivate; 72 73 struct StrokeHandler; 73 74 74 75 75 struct QIntRect { … … 134 134 }; 135 135 136 137 138 136 #ifndef QT_NO_DEBUG_STREAM 139 137 QDebug Q_GUI_EXPORT &operator<<(QDebug &, const QVectorPath &path); 140 138 #endif 141 142 class Q_GUI_EXPORT QPaintEngineExPrivate : public QPaintEnginePrivate143 {144 public:145 QPaintEngineExPrivate();146 ~QPaintEngineExPrivate();147 148 QStroker stroker;149 QDashStroker dasher;150 StrokeHandler *strokeHandler;151 QStrokerOps *activeStroker;152 QPen strokerPen;153 };154 139 155 140 class QPixmapFilter; … … 159 144 Q_DECLARE_PRIVATE(QPaintEngineEx) 160 145 public: 161 inline QPaintEngineEx() 162 : QPaintEngine(*new QPaintEngineExPrivate, AllFeatures) { extended = true; } 146 QPaintEngineEx(); 163 147 164 148 virtual QPainterState *createState(QPainterState *orig) const; … … 185 169 virtual void fillRect(const QRectF &rect, const QColor &color); 186 170 171 virtual void drawRoundedRect(const QRectF &rect, qreal xrad, qreal yrad, Qt::SizeMode mode); 172 187 173 virtual void drawRects(const QRect *rects, int rectCount); 188 174 virtual void drawRects(const QRectF *rects, int rectCount); … … 211 197 virtual void drawTiledPixmap(const QRectF &r, const QPixmap &pixmap, const QPointF &s); 212 198 199 virtual void drawPixmaps(const QDrawPixmaps::Data *drawingData, int dataCount, const QPixmap &pixmap, QFlags<QDrawPixmaps::DrawingHint> hints); 200 213 201 virtual void updateState(const QPaintEngineState &state); 214 202 … … 217 205 inline const QPainterState *state() const { return static_cast<const QPainterState *>(QPaintEngine::state); } 218 206 219 virtual QPixmapFilter *createPixmapFilter(int /*type*/) const { return 0; } 207 virtual void sync() {} 208 209 virtual void beginNativePainting() {} 210 virtual void endNativePainting() {} 211 212 // Return a pixmap filter of "type" that can render the parameters 213 // in "prototype". The returned filter is owned by the engine and 214 // will be destroyed when the engine is destroyed. The "prototype" 215 // allows the engine to pick different filters based on the parameters 216 // that will be requested, and not just the "type". 217 virtual QPixmapFilter *pixmapFilter(int /*type*/, const QPixmapFilter * /*prototype*/) { return 0; } 218 219 // These flags are needed in the implementation of paint buffers. 220 enum Flags 221 { 222 DoNotEmulate = 0x01, // If set, QPainter will not wrap this engine in an emulation engine. 223 IsEmulationEngine = 0x02 // If set, this object is a QEmulationEngine. 224 }; 225 virtual uint flags() const {return 0;} 220 226 221 227 protected: … … 223 229 }; 224 230 231 class Q_GUI_EXPORT QPaintEngineExPrivate : public QPaintEnginePrivate 232 { 233 Q_DECLARE_PUBLIC(QPaintEngineEx) 234 public: 235 QPaintEngineExPrivate(); 236 ~QPaintEngineExPrivate(); 237 238 void replayClipOperations(); 239 bool hasClipOperations() const; 240 241 QStroker stroker; 242 QDashStroker dasher; 243 StrokeHandler *strokeHandler; 244 QStrokerOps *activeStroker; 245 QPen strokerPen; 246 247 QRect exDeviceRect; 248 }; 225 249 226 250 inline uint QVectorPath::polygonFlags(QPaintEngine::PolygonDrawMode mode) { 227 251 switch (mode) { 228 252 case QPaintEngine::ConvexMode: return ConvexPolygonHint | ImplicitClose; 229 case QPaintEngine::OddEvenMode: return NonCurvedShapeHint | OddEvenFill | ImplicitClose;230 case QPaintEngine::WindingMode: return NonCurvedShapeHint | WindingFill | ImplicitClose;231 case QPaintEngine::PolylineMode: return NonCurvedShapeHint;253 case QPaintEngine::OddEvenMode: return PolygonHint | OddEvenFill | ImplicitClose; 254 case QPaintEngine::WindingMode: return PolygonHint | WindingFill | ImplicitClose; 255 case QPaintEngine::PolylineMode: return PolygonHint; 232 256 default: return 0; 233 257 }
Note:
See TracChangeset
for help on using the changeset viewer.