|
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. | |
| 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) |
| ~KoShapePainter () | |
| ~Private () | |
Public Attributes | |
| SimpleCanvas * | canvas |
Private Attributes | |
| Private *const | 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 104 of file KoShapePainter.cpp.
|
inline |
Definition at line 112 of file KoShapePainter.cpp.
|
explicit |
Definition at line 116 of file KoShapePainter.cpp.
| KoShapePainter::~KoShapePainter | ( | ) |
| QRectF KoShapePainter::contentRect | ( | ) | const |
Returns the bounding rect of the shapes to paint.
Definition at line 190 of file KoShapePainter.cpp.
References KoShape::boundingRect(), Private::canvas, d, KoShape::isVisible(), KisCanvas2::shapeManager, and KoShapeManager::shapes.
| 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 180 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 131 of file KoShapePainter.cpp.
References Private::canvas, d, KoShapeManager::paint(), KisCanvas2::shapeManager, KoShapeManager::shapes, 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 140 of file KoShapePainter.cpp.
References KoViewConverter::documentToView(), paint(), KoViewConverter::setZoom(), and KoViewConverter::viewToDocument().
|
inline |
Definition at line 107 of file KoShapePainter.cpp.
Sets the shapes to be painted.
| shapes | the shapes to paint |
Definition at line 126 of file KoShapePainter.cpp.
References KoShapeManager::AddWithoutRepaint, Private::canvas, d, KoShapeManager::setShapes(), and KisCanvas2::shapeManager.
| SimpleCanvas* KoShapePainter::canvas |
Definition at line 113 of file KoShapePainter.cpp.
|
private |
Definition at line 66 of file KoShapePainter.h.