diff options
author | Jørgen Lind <jorgen.lind@nokia.com> | 2009-11-16 10:33:26 (GMT) |
---|---|---|
committer | Jørgen Lind <jorgen.lind@nokia.com> | 2009-11-25 09:55:59 (GMT) |
commit | 7dea84cd015538dc327e489113919d75c8e275bb (patch) | |
tree | 4255c5f05fb73ea17eb2a5fb2c078df190652256 /src/gui/painting/qpaintengine_blitter.cpp | |
parent | efa0d024fc262b89189c0589a0ee81fe083635b1 (diff) | |
download | Qt-7dea84cd015538dc327e489113919d75c8e275bb.zip Qt-7dea84cd015538dc327e489113919d75c8e275bb.tar.gz Qt-7dea84cd015538dc327e489113919d75c8e275bb.tar.bz2 |
Added QBlittablePixmapData
Is going to be used by everyone that reimplements QBlittable
Diffstat (limited to 'src/gui/painting/qpaintengine_blitter.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_blitter.cpp | 31 |
1 files changed, 17 insertions, 14 deletions
diff --git a/src/gui/painting/qpaintengine_blitter.cpp b/src/gui/painting/qpaintengine_blitter.cpp index 367a8b5..b134d84 100644 --- a/src/gui/painting/qpaintengine_blitter.cpp +++ b/src/gui/painting/qpaintengine_blitter.cpp @@ -147,9 +147,9 @@ public: class QBlitterPaintEnginePrivate : public QPaintEngineExPrivate { public: - QBlitterPaintEnginePrivate(QPaintDevice *p) - : QPaintEngineExPrivate(), - raster(new QRasterPaintEngine(p)), isBlitterLocked(false), + QBlitterPaintEnginePrivate(QPixmapData *p) + : QPaintEngineExPrivate(), pixmap(p), + raster(new QRasterPaintEngine(&pixmap)), isBlitterLocked(false), capabillities(0), hasXForm(false) { if (QGraphicsSystem *gs = QApplicationPrivate::graphicsSystem()) { @@ -235,6 +235,7 @@ public: raster->d_func()->systemStateChanged(); } + QPixmap pixmap; QRasterPaintEngine *raster; QRasterPaintEngineState *state; @@ -246,7 +247,7 @@ public: uint hasXForm; }; -QBlitterPaintEngine::QBlitterPaintEngine(QPaintDevice *p) +QBlitterPaintEngine::QBlitterPaintEngine(QPixmapData *p) : QPaintEngineEx(*(new QBlitterPaintEnginePrivate(p))) { } @@ -607,23 +608,19 @@ void QBlitterPaintEngine::setState(QPainterState *s) class QBlittablePrivate { public: + QBlittablePrivate(const QRect &rect, QBlittable::Capabilities caps) + : m_rect(rect), caps(caps) + {} QBlittable::Capabilities caps; + QRect m_rect; }; -QBlittable::QBlittable(Capabilities caps) - : d_ptr(new QBlittablePrivate) +QBlittable::QBlittable(const QRect &rect, Capabilities caps) + : d_ptr(new QBlittablePrivate(rect,caps)) { - d_ptr->caps = caps; } -QBlittable::QBlittable(QBlittablePrivate &d, Capabilities caps) - : d_ptr(&d) -{ - d_ptr->caps = caps; -} - - QBlittable::~QBlittable() { delete d_ptr; @@ -636,3 +633,9 @@ QBlittable::Capabilities QBlittable::capabilities() const return d->caps; } +QRect QBlittable::rect() const +{ + Q_D(const QBlittable); + return d->m_rect; +} + |