Commit 0fd9a5d1 authored by C. Boemann's avatar C. Boemann

Pass a KoShapePaintingContext down through te shape painting.

At the moment it's an empty class but soon it will be used to pass various settings like
showFormttingCharacters in text etc.

The paintDecorations method has been removed. any such functionality can be done much better
using the KoShapePaintingContext.

REVIEW: 102809
parent df65b2c2
......@@ -85,7 +85,7 @@ QRectF KisLayerContainerShape::boundingRect() const
}
void KisLayerContainerShape::paintComponent(QPainter &painter, const KoViewConverter &converter)
void KisLayerContainerShape::paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
......
......@@ -51,7 +51,7 @@ public:
KisLayerSP groupLayer();
// KoShapeContainer implementation
void paintComponent(QPainter &painter, const KoViewConverter &converter);
void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
// KoShape overrides
bool isSelectable() const {
......
......@@ -66,14 +66,14 @@ KisNodeSP KisNodeShape::node()
return m_d->node;
}
void KisNodeShape::paint(QPainter &painter, const KoViewConverter &converter)
void KisNodeShape::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
}
void KisNodeShape::paintComponent(QPainter &painter, const KoViewConverter &converter)
void KisNodeShape::paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
......
......@@ -45,7 +45,7 @@ public:
KisNodeSP node();
// Shape overrides
void paint(QPainter &painter, const KoViewConverter &converter);
void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
bool isSelectable() const {
return false;
......@@ -58,7 +58,7 @@ public:
void setPosition(const QPointF & position);
// KoShapeContainer implementation
void paintComponent(QPainter &painter, const KoViewConverter &converter);
void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
/// reimplemented
virtual void saveOdf(KoShapeSavingContext & context) const;
......
......@@ -301,7 +301,7 @@ QPainterPath KisShapeSelection::selectionOutline()
return m_outline;
}
void KisShapeSelection::paintComponent(QPainter& painter, const KoViewConverter& converter)
void KisShapeSelection::paintComponent(QPainter& painter, const KoViewConverter& converter, KoShapePaintingContext &)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
......
......@@ -83,7 +83,7 @@ public:
protected:
virtual void paintComponent(QPainter& painter, const KoViewConverter& converter);
virtual void paintComponent(QPainter& painter, const KoViewConverter& converter, KoShapePaintingContext &paintcontext);
private:
......
......@@ -39,6 +39,7 @@ set(flake_SRCS
KoShapeGroup.cpp
KoShapeManagerPaintingStrategy.cpp
KoShapeManager.cpp
KoShapePaintingContext.cpp
KoShapePainter.cpp
KoFrameShape.cpp
KoUnavailShape.cpp
......
......@@ -31,6 +31,7 @@
#include "KoCanvasBase.h"
#include "KoShapeLayer.h"
#include "KoShapePaste.h"
#include "KoShapePaintingContext.h"
#include <KoProperties.h>
......@@ -272,7 +273,8 @@ void Viewport::handlePaintEvent(QPainter &painter, QPaintEvent *event)
painter.setOpacity(0.6);
painter.translate(offset.x(), offset.y());
painter.setRenderHint(QPainter::Antialiasing);
m_draggedShape->paint(painter, *vc);
KoShapePaintingContext paintContext; //FIXME
m_draggedShape->paint(painter, *vc, paintContext);
painter.restore();
}
}
......
......@@ -240,7 +240,7 @@ void KoPathShape::clear()
m_subpaths.clear();
}
void KoPathShape::paint(QPainter &painter, const KoViewConverter &converter)
void KoPathShape::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext)
{
Q_D(KoPathShape);
applyConversion(painter, converter);
......
......@@ -83,7 +83,7 @@ public:
virtual ~KoPathShape();
/// reimplemented
virtual void paint(QPainter &painter, const KoViewConverter &converter);
virtual void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
virtual void paintPoints(QPainter &painter, const KoViewConverter &converter, int handleRadius);
/// reimplemented
virtual QPainterPath outline() const;
......
......@@ -119,7 +119,7 @@ KoSelection::~KoSelection()
{
}
void KoSelection::paint(QPainter &painter, const KoViewConverter &converter)
void KoSelection::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
......
......@@ -58,7 +58,7 @@ public:
KoSelection();
virtual ~KoSelection();
virtual void paint(QPainter &painter, const KoViewConverter &converter);
virtual void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
/**
* Adds a shape to the selection.
......
......@@ -277,28 +277,6 @@ KoShape::~KoShape()
delete d_ptr;
}
void KoShape::paintDecorations(QPainter &painter, const KoViewConverter &converter, const KoCanvasBase *canvas)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
Q_UNUSED(canvas);
/* Since this code is not actually used (flow is going to be the main user) lets disable instead of fix.
if (selected)
{
// draw connectors
QPen pen(Qt::blue);
pen.setWidth(0);
painter.setPen(pen);
painter.setBrush(Qt::NoBrush);
for (int i = 0; i < d->connectors.size(); ++i)
{
QPointF p = converter.documentToView(d->connectors[ i ]);
painter.drawLine(QPointF(p.x() - 2, p.y() + 2), QPointF(p.x() + 2, p.y() - 2));
painter.drawLine(QPointF(p.x() + 2, p.y() + 2), QPointF(p.x() - 2, p.y() - 2));
}
}*/
}
void KoShape::scale(qreal sx, qreal sy)
{
Q_D(KoShape);
......
......@@ -63,6 +63,7 @@ class KoShapePrivate;
class KoFilterEffectStack;
class KoSnapData;
class KoClipPath;
class KoShapePaintingContext;
/**
*
......@@ -175,19 +176,9 @@ public:
* @param painter used for painting the shape
* @param converter to convert between internal and view coordinates.
* @see applyConversion()
* @param paintcontext the painting context.
*/
virtual void paint(QPainter &painter, const KoViewConverter &converter) = 0;
/**
* Paint non-print decorations specific for this type of shape.
* The default implementation is empty.
*
* @param painter used for painting the shape
* @param converter to convert between internal and view coordinates.
* @param canvas the canvas that requested this paint. This can be used to retrieve canvas specific properties
* like selection and get a reference to the KoDocumentResourceManager.
*/
virtual void paintDecorations(QPainter &painter, const KoViewConverter &converter, const KoCanvasBase *canvas);
virtual void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext) = 0;
/**
* Load a shape from odf
......
......@@ -147,11 +147,11 @@ bool KoShapeContainer::inheritsTransform(const KoShape *shape) const
return d->model->inheritsTransform(shape);
}
void KoShapeContainer::paint(QPainter &painter, const KoViewConverter &converter)
void KoShapeContainer::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext)
{
Q_D(KoShapeContainer);
painter.save();
paintComponent(painter, converter);
paintComponent(painter, converter, paintcontext);
painter.restore();
if (d->model == 0 || d->model->count() == 0)
return;
......@@ -194,7 +194,7 @@ void KoShapeContainer::paint(QPainter &painter, const KoViewConverter &converter
painter.save();
painter.setTransform(shape->absoluteTransformation(&converter) * baseMatrix);
shape->paint(painter, converter);
shape->paint(painter, converter, paintcontext);
painter.restore();
if (shape->border()) {
painter.save();
......
......@@ -183,7 +183,7 @@ public:
/// reimplemented
virtual void paint(QPainter &painter, const KoViewConverter &converter);
virtual void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
/**
* @brief Paint the component
......@@ -194,7 +194,7 @@ public:
* @param converter to convert between internal and view coordinates.
* @see applyConversion()
*/
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter) = 0;
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext) = 0;
using KoShape::update;
/// reimplemented
......
......@@ -101,7 +101,7 @@ KoShapeGroup::~KoShapeGroup()
{
}
void KoShapeGroup::paintComponent(QPainter &painter, const KoViewConverter &converter)
void KoShapeGroup::paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
......
......@@ -50,7 +50,7 @@ public:
/// destructor
virtual ~KoShapeGroup();
/// This implementation is empty since a group is itself not visible.
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter);
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
/// always returns false since the group itself can't be selected or hit
virtual bool hitTest(const QPointF &position) const;
/// a group in flake doesn't have a size, this funcion just returns QSizeF(0,0)
......
......@@ -84,6 +84,6 @@ bool KoShapeLayer::loadOdf(const KoXmlElement & element, KoShapeLoadingContext &
return true;
}
void KoShapeLayer::paintComponent(QPainter &, const KoViewConverter &)
void KoShapeLayer::paintComponent(QPainter &, const KoViewConverter &, KoShapePaintingContext &)
{
}
......@@ -45,7 +45,7 @@ public:
/**
* Empty implementation, as the layer itself is not visible
*/
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter);
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
virtual bool hitTest(const QPointF &position) const;
virtual QRectF boundingRect() const;
virtual void saveOdf(KoShapeSavingContext & context) const;
......
......@@ -40,6 +40,7 @@
#include "KoShapeBackground.h"
#include <KoRTree.h>
#include "KoClipPath.h"
#include "KoShapePaintingContext.h"
#include <QPainter>
#include <QTimer>
......@@ -73,7 +74,7 @@ public:
* This is needed for filter effects on group shapes where the filter effect
* applies to all the children of the group shape at once
*/
void paintGroup(KoShapeGroup *group, QPainter &painter, const KoViewConverter &converter, bool forPrint);
void paintGroup(KoShapeGroup *group, QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintContext);
class DetectCollision
{
......@@ -149,7 +150,7 @@ void KoShapeManager::Private::updateTree()
}
}
void KoShapeManager::Private::paintGroup(KoShapeGroup *group, QPainter &painter, const KoViewConverter &converter, bool forPrint)
void KoShapeManager::Private::paintGroup(KoShapeGroup *group, QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintContext)
{
QList<KoShape*> shapes = group->shapes();
qSort(shapes.begin(), shapes.end(), KoShape::compareShapeZIndex);
......@@ -159,10 +160,10 @@ void KoShapeManager::Private::paintGroup(KoShapeGroup *group, QPainter &painter,
continue;
KoShapeGroup *childGroup = dynamic_cast<KoShapeGroup*>(child);
if (childGroup) {
paintGroup(childGroup, painter, converter, forPrint);
paintGroup(childGroup, painter, converter, paintContext);
} else {
painter.save();
strategy->paint(child, painter, converter, forPrint);
strategy->paint(child, painter, converter, paintContext);
painter.restore();
}
}
......@@ -332,7 +333,8 @@ void KoShapeManager::paint(QPainter &painter, const KoViewConverter &converter,
KoClipPath::applyClipping(shape, painter, converter);
// let the painting strategy paint the shape
d->strategy->paint(shape, painter, converter, forPrint);
KoShapePaintingContext paintContext; //FIXME
d->strategy->paint(shape, painter, converter, paintContext);
painter.restore();
}
......@@ -348,11 +350,13 @@ void KoShapeManager::paint(QPainter &painter, const KoViewConverter &converter,
painter.restore();
#endif
if (! forPrint)
d->selection->paint(painter, converter);
if (! forPrint) {
KoShapePaintingContext paintContext; //FIXME
d->selection->paint(painter, converter, paintContext);
}
}
void KoShapeManager::paintShape(KoShape *shape, QPainter &painter, const KoViewConverter &converter, bool forPrint)
void KoShapeManager::paintShape(KoShape *shape, QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintContext)
{
qreal transparency = shape->transparency(true);
if (transparency > 0.0) {
......@@ -366,7 +370,7 @@ void KoShapeManager::paintShape(KoShape *shape, QPainter &painter, const KoViewC
}
if (!shape->filterEffectStack() || shape->filterEffectStack()->isEmpty()) {
painter.save();
shape->paint(painter, converter);
shape->paint(painter, converter, paintContext);
painter.restore();
if (shape->border()) {
painter.save();
......@@ -405,10 +409,10 @@ void KoShapeManager::paintShape(KoShape *shape, QPainter &painter, const KoViewC
// the childrens matrix contains the groups matrix as well
// so we have to compensate for that before painting the children
imagePainter.setTransform(group->absoluteTransformation(&converter).inverted(), true);
d->paintGroup(group, imagePainter, converter, forPrint);
d->paintGroup(group, imagePainter, converter, paintContext);
} else {
imagePainter.save();
shape->paint(imagePainter, converter);
shape->paint(imagePainter, converter, paintContext);
imagePainter.restore();
if (shape->border()) {
imagePainter.save();
......@@ -483,10 +487,6 @@ void KoShapeManager::paintShape(KoShape *shape, QPainter &painter, const KoViewC
painter.drawImage(clippingOffset, imageBuffers.value(lastEffect->output()));
painter.restore();
}
if (!forPrint) {
painter.setRenderHint(QPainter::Antialiasing, false);
shape->paintDecorations(painter, converter, d->canvas);
}
}
KoShape *KoShapeManager::shapeAt(const QPointF &position, KoFlake::ShapeSelection selection, bool omitHiddenShapes)
......
......@@ -35,6 +35,7 @@ class KoViewConverter;
class KoCanvasBase;
class KoPointerEvent;
class KoShapeManagerPaintingStrategy;
class KoShapePaintingContext;
class QPainter;
......@@ -183,9 +184,8 @@ public:
* @param shape the shape to paint
* @param painter the painter to paint to.
* @param converter to convert between document and view coordinates.
* @param forPrint if true, make sure only actual content is drawn and no decorations.
*/
void paintShape(KoShape *shape, QPainter &painter, const KoViewConverter &converter, bool forPrint);
void paintShape(KoShape *shape, QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintContext);
/**
* Set the strategy of the KoShapeManager
......
......@@ -44,12 +44,12 @@ KoShapeManagerPaintingStrategy::~KoShapeManagerPaintingStrategy()
delete d;
}
void KoShapeManagerPaintingStrategy::paint(KoShape * shape, QPainter &painter, const KoViewConverter &converter, bool forPrint)
void KoShapeManagerPaintingStrategy::paint(KoShape * shape, QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintContext)
{
if (d->shapeManager) {
painter.save();
painter.setTransform(shape->absoluteTransformation(&converter) * painter.transform());
d->shapeManager->paintShape(shape, painter, converter, forPrint);
d->shapeManager->paintShape(shape, painter, converter, paintContext);
painter.restore(); // for the matrix
}
}
......
......@@ -27,6 +27,7 @@ class KoCanvasBase;
class KoShapeManager;
class KoShape;
class KoViewConverter;
class KoShapePaintingContext;
class QPainter;
class QRectF;
......@@ -51,7 +52,7 @@ public:
* @param converter to convert between document and view coordinates.
* @param forPrint if true, make sure only actual content is drawn and no decorations.
*/
virtual void paint(KoShape *shape, QPainter &painter, const KoViewConverter &converter, bool forPrint);
virtual void paint(KoShape *shape, QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintContext);
/**
* Adapt the rect the shape occupies
......
/* This file is part of the KDE project
Copyright (C) 2011 C. Boemann <cbo@boemann.dk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include "KoShapePaintingContext.h"
KoShapePaintingContext::KoShapePaintingContext()
{
}
KoShapePaintingContext::~KoShapePaintingContext()
{
}
/* This file is part of the KDE project
Copyright (C) 2011 C. Boemann <cbo@boemann.dk>
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Library General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Library General Public License for more details.
You should have received a copy of the GNU Library General Public License
along with this library; see the file COPYING.LIB. If not, write to
the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#ifndef KOSHAPEPAINTINGCONTEXT_H
#define KOSHAPEPAINTINGCONTEXT_H
#include <QSet>
#include <QString>
#include <QVariant>
#include "flake_export.h"
/**
* Context passed to shapes during painting.
*/
class FLAKE_EXPORT KoShapePaintingContext
{
public:
KoShapePaintingContext();
~KoShapePaintingContext();
};
#endif /* KOSHAPEPAINTINGCONTEXT_H */
......@@ -56,7 +56,7 @@ KoTosContainer::KoTosContainer(KoTosContainerPrivate &dd)
{
}
void KoTosContainer::paintComponent(QPainter &, const KoViewConverter &)
void KoTosContainer::paintComponent(QPainter &, const KoViewConverter &, KoShapePaintingContext &)
{
}
......
......@@ -42,7 +42,7 @@ public:
virtual ~KoTosContainer();
// reimplemented
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter);
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
// reimplemented
virtual bool loadText(const KoXmlElement &element, KoShapeLoadingContext &context);
......
......@@ -189,7 +189,7 @@ KoUnavailShape::~KoUnavailShape()
}
void KoUnavailShape::paint(QPainter &painter, const KoViewConverter &converter)
void KoUnavailShape::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &)
{
applyConversion(painter, converter);
......@@ -209,7 +209,7 @@ void KoUnavailShape::paint(QPainter &painter, const KoViewConverter &converter)
}
}
void KoUnavailShape::paintComponent(QPainter &painter, const KoViewConverter &converter)
void KoUnavailShape::paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
......
......@@ -57,9 +57,9 @@ public:
// Inherited methods
/// reimplemented
void paint(QPainter &painter, const KoViewConverter &converter);
void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
/// reimplemented from KoShapeContainer
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter);
virtual void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext);
/// reimplemented
virtual void saveOdf(KoShapeSavingContext & context) const;
/// reimplemented
......
......@@ -33,7 +33,7 @@ class MockShape : public KoShape
{
public:
MockShape() : paintedCount(0) {}
void paint(QPainter &painter, const KoViewConverter &converter) {
void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &) {
Q_UNUSED(painter);
Q_UNUSED(converter);
//qDebug() << "Shape" << kBacktrace( 10 );
......@@ -50,7 +50,7 @@ class MockContainer : public KoShapeContainer
{
public:
MockContainer(KoShapeContainerModel *model = 0) : KoShapeContainer(model), paintedCount(0) {}
void paintComponent(QPainter &painter, const KoViewConverter &converter) {
void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &) {
Q_UNUSED(painter);
Q_UNUSED(converter);
//qDebug() << "Container:" << kBacktrace( 10 );
......@@ -66,7 +66,7 @@ public:
class MockGroup : public KoShapeGroup
{
void paintComponent(QPainter &painter, const KoViewConverter &converter) {
void paintComponent(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &) {
Q_UNUSED(painter);
Q_UNUSED(converter);
}
......
......@@ -23,6 +23,8 @@
#include <QtGui>
#include "KoShapeContainer.h"
#include "KoShapeManager.h"
#include "KoShapePaintingContext.h"
#include <MockShapes.h>
#include <kcomponentdata.h>
......@@ -63,7 +65,8 @@ void TestShapePainting::testPaintShape()
shape1.paintedCount = 0;
shape2.paintedCount = 0;
container.paintedCount = 0;
container.paint(painter, vc);
KoShapePaintingContext paintContext;
container.paint(painter, vc, paintContext);
QCOMPARE(shape1.paintedCount, 0);
QCOMPARE(shape2.paintedCount, 0);
QCOMPARE(container.paintedCount, 1);
......@@ -132,9 +135,9 @@ void TestShapePainting::testPaintOrder()
class OrderedMockShape : public MockShape {
public:
OrderedMockShape(QList<MockShape*> &list) : order(list) {}
void paint(QPainter &painter, const KoViewConverter &converter) {
void paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &paintcontext) {
order.append(this);
MockShape::paint(painter, converter);
MockShape::paint(painter, converter, paintcontext);
}
QList<MockShape*> &order;
};
......
......@@ -30,6 +30,7 @@
#include "SnapGuideConfigWidget.h"
#include "KoCanvasResourceManager.h"
#include "KoDocumentResourceManager.h"
#include "KoShapePaintingContext.h"
#include <KNumInput>
......@@ -107,7 +108,9 @@ void KoCreatePathTool::paintPath(KoPathShape& pathShape, QPainter &painter, cons
Q_D(KoCreatePathTool);
painter.setTransform(pathShape.absoluteTransformation(&converter) * painter.transform());
painter.save();
pathShape.paint(painter, converter);
KoShapePaintingContext paintContext; //FIXME
pathShape.paint(painter, converter, paintContext);
painter.restore();
if (pathShape.border()) {
painter.save();
......
......@@ -65,7 +65,7 @@ KoPAPageBase::~KoPAPageBase()
}
}
void KoPAPageBase::paintComponent(QPainter& painter, const KoViewConverter& converter)
void KoPAPageBase::paintComponent(QPainter& painter, const KoViewConverter& converter, KoShapePaintingContext &)
{
Q_UNUSED(painter);
Q_UNUSED(converter);
......
......@@ -71,7 +71,7 @@ public:
virtual KoPageLayout & pageLayout() = 0;
virtual const KoPageLayout & pageLayout() const = 0;
virtual void paintComponent(QPainter& painter, const KoViewConverter& converter);
virtual void paintComponent(QPainter& painter, const KoViewConverter& converter, KoShapePaintingContext &paintcontext);
/**
* @brief Paint background
......
......@@ -65,17 +65,13 @@ ArtisticTextShape::~ArtisticTextShape()
}
}
void ArtisticTextShape::paint(QPainter &painter, const KoViewConverter &converter)
void ArtisticTextShape::paint(QPainter &painter, const KoViewConverter &converter, KoShapePaintingContext &)
{