|
Krita Source Code Documentation
|
#include <KoShapePainter.h>
Inheritance diagram for KoShapePainter:Public Member Functions | |
| QRectF | contentRect () const |
| Returns the bounding rect of the shapes to paint. | |
| KoShapeManager * | internalShapeManager () const |
| internalShapeManager KoShapePainter has an internal shape manager that is used to paint the shapes. | |
| KoShapePainter () | |
| void | paint (QImage &image) |
| void | paint (QPainter &painter) |
| void | paint (QPainter &painter, const QRect &painterRect, const QRectF &documentRect) |
| Private () | |
| void | setShapes (const QList< KoShape * > &shapes) |
| void | setUpdateFunction (std::function< void(const QRectF &)> function) |
| ~KoShapePainter () | |
| ~Private () | |
Public Attributes | |
| SimpleCanvas * | canvas |
Private Attributes | |
| QScopedPointer< Private > | d |
Private Attributes inherited from Private | |
| KisCanvas2 * | canvas |
| int | displayedFrame |
| int | intendedFrame |
Additional Inherited Members | |
Private Member Functions inherited from Private | |
| Private (KisCanvas2 *c) | |
A utility class to paint a subset of shapes onto a QPainter. Notice that using setShapes repeatedly is very expensive, as it populates the shapeManager and all its caching every time. If at all possible use a shapeManager directly and avoid losing the cache between usages.
Definition at line 110 of file KoShapePainter.cpp.
|
inline |
Definition at line 118 of file KoShapePainter.cpp.
|
explicit |
Definition at line 122 of file KoShapePainter.cpp.
| KoShapePainter::~KoShapePainter | ( | ) |
Definition at line 127 of file KoShapePainter.cpp.
| QRectF KoShapePainter::contentRect | ( | ) | const |
Returns the bounding rect of the shapes to paint.
Definition at line 195 of file KoShapePainter.cpp.
References KoShape::boundingRect(), d, and KoShape::isVisible().
| KoShapeManager * KoShapePainter::internalShapeManager | ( | ) | const |
internalShapeManager KoShapePainter has an internal shape manager that is used to paint the shapes.
Definition at line 214 of file KoShapePainter.cpp.
References KoShapeManager::canvas, d, and KoCanvasBase::shapeManager().
| void KoShapePainter::paint | ( | QImage & | image | ) |
Paints shapes to the given image, so that all shapes fit onto it.
| image | the image to paint into |
Definition at line 185 of file KoShapePainter.cpp.
References contentRect(), and paint().
| void KoShapePainter::paint | ( | QPainter & | painter | ) |
Paints the shapes on the given painter and using the zoom handler.
| painter | the painter to paint on |
| converter | the view converter defining the zoom to use |
Definition at line 136 of file KoShapePainter.cpp.
References d, and KoShape::waitUntilReady().
| void KoShapePainter::paint | ( | QPainter & | painter, |
| const QRect & | painterRect, | ||
| const QRectF & | documentRect ) |
Paints the shapes on the given painter. The given document rectangle is painted to fit into the given painter rectangle.
| painter | the painter to paint on |
| painterRect | the destination rectangle on the painter |
| documentRect | the document region to paint |
Definition at line 145 of file KoShapePainter.cpp.
References KoViewConverter::documentToView(), paint(), KoViewConverter::setZoom(), and KoViewConverter::viewToDocument().
|
inline |
Definition at line 113 of file KoShapePainter.cpp.
Sets the shapes to be painted.
| shapes | the shapes to paint |
Definition at line 131 of file KoShapePainter.cpp.
References KoShapeManager::AddWithoutRepaint, and d.
Definition at line 219 of file KoShapePainter.cpp.
References KoShapeManager::canvas, and d.
| SimpleCanvas* KoShapePainter::canvas |
Definition at line 119 of file KoShapePainter.cpp.
|
private |
Definition at line 77 of file KoShapePainter.h.