Commit c884804e authored by Friedrich W. H. Kossebau's avatar Friedrich W. H. Kossebau
Browse files

Be consistent with usage of pimpl in KisQPainterCanvas

parent 950160bd
......@@ -66,6 +66,7 @@ class KisQPainterCanvas::Private
public:
KisPrescaledProjectionSP prescaledProjection;
QBrush checkBrush;
QImage buffer;
};
KisQPainterCanvas::KisQPainterCanvas(KisCanvas2 *canvas, KisCoordinatesConverter *coordinatesConverter, QWidget * parent)
......@@ -101,11 +102,11 @@ void KisQPainterCanvas::paintEvent(QPaintEvent * ev)
setAutoFillBackground(false);
if (m_buffer.size() != size()) {
m_buffer = QImage(size(), QImage::Format_ARGB32_Premultiplied);
if (m_d->buffer.size() != size()) {
m_d->buffer = QImage(size(), QImage::Format_ARGB32_Premultiplied);
}
QPainter gc(&m_buffer);
QPainter gc(&m_d->buffer);
// we double buffer, so we paint on an image first, then from the image onto the canvas,
// so copy the clip region since otherwise we're filling the whole buffer every time with
......@@ -143,7 +144,7 @@ void KisQPainterCanvas::paintEvent(QPaintEvent * ev)
gc.end();
QPainter painter(this);
painter.drawImage(ev->rect(), m_buffer, ev->rect());
painter.drawImage(ev->rect(), m_d->buffer, ev->rect());
}
void KisQPainterCanvas::drawImage(QPainter & gc, const QRect &updateWidgetRect) const
......
......@@ -24,7 +24,6 @@
#include "kis_canvas_widget_base.h"
#include "kis_ui_types.h"
class QImage;
class QPaintEvent;
class KisCanvas2;
class KisDisplayColorConverter;
......@@ -90,8 +89,6 @@ private Q_SLOTS:
void slotConfigChanged();
private:
QImage m_buffer;
class Private;
Private * const m_d;
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment