38 void gridSize(QPointF *offset, QSizeF *spacing)
const override
142 if (documentRect.width() == 0.0f || documentRect.height() == 0.0f)
147 QRectF paintBox = converter.
viewToDocument(QRectF(QPointF(), painterRect.size()));
151 qreal zoomW = paintBox.width() / documentRect.width();
152 qreal zoomH = paintBox.height() / documentRect.height();
153 qreal zoom = qMin(zoomW, zoomH);
161 painter.setPen(QPen(Qt::NoPen));
162 painter.setBrush(Qt::NoBrush);
163 painter.setRenderHint(QPainter::Antialiasing);
164 painter.setClipRect(painterRect.adjusted(-1,-1,1,1));
169 QPointF offset = QRectF(painterRect).center() - zoomedBound.center();
171 painter.translate(offset.x(), offset.y());
185 QPainter painter(&image);
204 bound = bound.united(shapeRect);
KoShapeManager shapeManager
The KoSelectedShapesProxy class is a special interface of KoCanvasBase to have a stable connection to...
@ AddWithoutRepaint
Avoids each shapes 'update()' to be called for faster addition when its possible.
QList< KoShape * > shapes
void setShapes(const QList< KoShape * > &shapes, Repaint repaint=PaintShapeOnAdd)
void paint(QPainter &painter)
void setShapes(const QList< KoShape * > &shapes)
QRectF contentRect() const
Returns the bounding rect of the shapes to paint.
void paint(QPainter &painter)
virtual QRectF boundingRect() const
Get the bounding box of the shape.
bool isVisible(bool recursive=true) const
virtual void waitUntilReady(bool asynchronous=true) const
@ Point
Postscript point, 1/72th of an Inco.
virtual void setZoom(qreal zoom)
virtual QPointF viewToDocument(const QPointF &viewPoint) const
virtual QPointF documentToView(const QPointF &documentPoint) const
QWidget * canvasWidget() override
KoSelectedShapesProxy * selectedShapesProxy() const override
selectedShapesProxy() is a special interface for keeping a persistent connections to selectionChanged...
const KoViewConverter * viewConverter() const override
void gridSize(QPointF *offset, QSizeF *spacing) const override
bool snapToGrid() const override
void setCursor(const QCursor &) override
void addCommand(KUndo2Command *) override
QScopedPointer< KoShapeManager > m_shapeManager
const QWidget * canvasWidget() const override
KoToolProxy * toolProxy() const override
KoUnit unit() const override
QScopedPointer< KoSelectedShapesProxySimple > m_selectedShapesProxy
void updateCanvas(const QRectF &) override
KoViewConverter * viewConverter() override
KoShapeManager * shapeManager() const override