Commit ed1c4b55 authored by Halla Rempt's avatar Halla Rempt

* Add an updateCanvas method with a QRegion parameter (and a default implementation

so as not to inconvenience others)
* Fix spello

svn path=/trunk/koffice/; revision=620768
parent 12681524
......@@ -33,3 +33,9 @@ KoCanvasBase::~KoCanvasBase()
delete m_resourceProvider;
delete m_shapeController;
}
void KoCanvasBase::updateCanvas( const QRegion & region )
{
updateCanvas( QRectF( region.boundingRect() ) );
}
......@@ -29,6 +29,7 @@
#include <QPoint>
#include <QRectF>
#include <QRect>
#include <QRegion>
#include <QWidget>
......@@ -99,6 +100,14 @@ public:
*/
virtual void updateCanvas(const QRectF& rc) = 0;
/**
* Tell the canvas to repaint the specified region. The
* are document coordinates, not view coordinates. The
* default implementation calls the slow QRegion::boundingRect()
* method.
*/
virtual void updateCanvas(const QRegion & region);
/**
* Return the proxy to the active tool (determining which tool
* is really, really active is hard when tablets are involved,
......
......@@ -16,6 +16,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
#include <kdebug.h>
#include "KoShapeContainer.h"
......@@ -80,11 +81,12 @@ void KoShapeContainer::paint(QPainter &painter, const KoViewConverter &converter
if(m_children == 0 || m_children->count() == 0)
return;
QList<KoShape*> sorterdObjects = m_children->iterator();
qSort(sorterdObjects.begin(), sorterdObjects.end(), KoShape::compareShapeZIndex);
QList<KoShape*> sortedObjects = m_children->iterator();
qSort(sortedObjects.begin(), sortedObjects.end(), KoShape::compareShapeZIndex);
painter.setMatrix( m_invMatrix * painter.matrix() );
QMatrix myMatrix = transformationMatrix(&converter);
foreach (KoShape *shape, sorterdObjects) {
foreach (KoShape *shape, sortedObjects) {
kDebug() << "painting shape: " << shape->shapeId() << ", " << shape->boundingRect() << endl;
if(! shape->isVisible())
continue;
// TODO this is not perfect yet..
......
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