|
Krita Source Code Documentation
|
The Shape class The shape class is a wrapper around Krita's vector objects. More...
#include <Shape.h>
Inheritance diagram for Shape:Classes | |
| struct | Private |
Public Slots | |
| QTransform | absoluteTransformation () const |
| transformation the 2D transformation matrix of the shape including all grandparent transforms. | |
| QRectF | boundingBox () const |
| boundingBox the bounding box of the shape in points | |
| void | deselect () |
| deselect deselects the shape. | |
| bool | geometryProtected () const |
| geometryProtected | |
| bool | isSelected () |
| isSelected | |
| QString | name () const |
| name | |
| Shape * | parentShape () const |
| parentShape | |
| QPointF | position () const |
| position the position of the shape in points. | |
| bool | remove () |
| remove delete the shape. | |
| void | select () |
| select selects the shape. | |
| bool | selectable () const |
| selectable | |
| void | setGeometryProtected (bool protect) |
| setGeometryProtected | |
| void | setName (const QString &name) |
| setName | |
| void | setPosition (QPointF point) |
| setPosition set the position of the shape. | |
| void | setSelectable (bool selectable) |
| setSelectable | |
| void | setTransformation (QTransform matrix) |
| setTransformation set the 2D transformation matrix of the shape. | |
| void | setVisible (bool visible) |
| setVisible | |
| void | setZIndex (int zindex) |
| setZIndex | |
| QString | toSvg (bool prependStyles=false, bool stripTextMode=true) |
| toSvg convert the shape to svg, will not include style definitions. | |
| QTransform | transformation () const |
| transformation the 2D transformation matrix of the shape. | |
| virtual QString | type () const |
| type | |
| void | update () |
| update queue the shape update. | |
| void | updateAbsolute (QRectF box) |
| updateAbsolute queue the shape update in the specified rectangle. | |
| bool | visible () const |
| visible | |
| int | zIndex () const |
| zIndex | |
Public Member Functions | |
| bool | operator!= (const Shape &other) const |
| bool | operator== (const Shape &other) const |
| Shape (KoShape *shape, QObject *parent=0) | |
| ~Shape () | |
Private Member Functions | |
| KoShape * | shape () |
Private Attributes | |
| Private *const | d |
Friends | |
| class | GroupShape |
| class | VectorLayer |
The Shape class The shape class is a wrapper around Krita's vector objects.
Some example code to parse through interesting information in a given vector layer with shapes.
|
explicit |
Definition at line 31 of file Shape.cpp.
References d, Shape::Private::shape, and shape().
|
slot |
transformation the 2D transformation matrix of the shape including all grandparent transforms.
Definition at line 133 of file Shape.cpp.
References KoShape::absoluteTransformation(), d, and Shape::Private::shape.
|
slot |
boundingBox the bounding box of the shape in points
Definition at line 108 of file Shape.cpp.
References KoShape::boundingRect(), d, and Shape::Private::shape.
|
slot |
deselect deselects the shape.
Definition at line 203 of file Shape.cpp.
References KisMainWindow::activeView, KisView::canvasBase(), KisPart::currentMainwindow(), d, KoSelection::deselect(), KisPart::instance(), KoShapeManager::selection, Shape::Private::shape, and KisCanvas2::shapeManager.
|
slot |
geometryProtected
Definition at line 88 of file Shape.cpp.
References d, KoShape::isGeometryProtected(), and Shape::Private::shape.
|
slot |
isSelected
Definition at line 213 of file Shape.cpp.
References KisMainWindow::activeView, KisView::canvasBase(), KisPart::currentMainwindow(), d, KisPart::instance(), KoSelection::isSelected(), KoShapeManager::selection, Shape::Private::shape, and KisCanvas2::shapeManager.
|
slot |
name
Definition at line 53 of file Shape.cpp.
References d, KoShape::name(), and Shape::Private::shape.
| bool Shape::operator!= | ( | const Shape & | other | ) | const |
| bool Shape::operator== | ( | const Shape & | other | ) | const |
|
slot |
parentShape
Definition at line 223 of file Shape.cpp.
References d, GroupShape, KoShape::parent(), and Shape::Private::shape.
|
slot |
position the position of the shape in points.
Definition at line 113 of file Shape.cpp.
References d, KoShape::position(), and Shape::Private::shape.
|
slot |
remove delete the shape.
Definition at line 148 of file Shape.cpp.
References Krita::activeDocument(), d, Krita::instance(), KisPart::instance(), KoShape::parent(), KisProcessingApplicator::runSingleCommandStroke(), Shape::Private::shape, and KisPart::views.
|
slot |
select selects the shape.
Definition at line 193 of file Shape.cpp.
References KisMainWindow::activeView, KisView::canvasBase(), KisPart::currentMainwindow(), d, KisPart::instance(), KoSelection::select(), KoShapeManager::selection, Shape::Private::shape, and KisCanvas2::shapeManager.
|
slot |
selectable
Definition at line 78 of file Shape.cpp.
References d, KoShape::isSelectable(), and Shape::Private::shape.
|
slot |
setGeometryProtected
| protect | whether the shape should be geometry protected from the user. |
Definition at line 93 of file Shape.cpp.
References d, KoShape::setGeometryProtected(), and Shape::Private::shape.
|
slot |
setName
| name | which name the shape should have. |
Definition at line 58 of file Shape.cpp.
References d, name(), KoShape::setName(), and Shape::Private::shape.
|
slot |
setPosition set the position of the shape.
| point | the new position in points |
Definition at line 118 of file Shape.cpp.
References d, KoShape::setPosition(), and Shape::Private::shape.
|
slot |
setSelectable
| selectable | whether the shape should be user selectable. |
Definition at line 83 of file Shape.cpp.
References d, selectable(), KoShape::setSelectable(), and Shape::Private::shape.
|
slot |
setTransformation set the 2D transformation matrix of the shape.
| matrix | the new 2D transformation matrix. |
Definition at line 128 of file Shape.cpp.
References d, KoShape::setTransformation(), and Shape::Private::shape.
|
slot |
setVisible
| visible | whether the shape should be visible. |
Definition at line 103 of file Shape.cpp.
References d, KoShape::setVisible(), Shape::Private::shape, and visible().
|
slot |
setZIndex
| zindex | set the shape zindex value. |
Definition at line 73 of file Shape.cpp.
References d, KoShape::setZIndex(), and Shape::Private::shape.
|
private |
|
slot |
toSvg convert the shape to svg, will not include style definitions.
| prependStyles | prepend the style data. Default: false |
| stripTextMode | enable strip text mode. Default: true |
Definition at line 172 of file Shape.cpp.
References d, SvgWriter::saveDetached(), SvgSavingContext::setStrippedTextMode(), and Shape::Private::shape.
|
slot |
transformation the 2D transformation matrix of the shape.
Definition at line 123 of file Shape.cpp.
References d, Shape::Private::shape, and KoShape::transformation().
|
virtualslot |
type
Definition at line 63 of file Shape.cpp.
References d, Shape::Private::shape, and KoShape::shapeId().
|
slot |
update queue the shape update.
Definition at line 138 of file Shape.cpp.
References d, Shape::Private::shape, and KoShape::update().
|
slot |
updateAbsolute queue the shape update in the specified rectangle.
| box | the RectF rectangle to update. |
Definition at line 143 of file Shape.cpp.
References d, Shape::Private::shape, and KoShape::updateAbsolute().
|
slot |
visible
Definition at line 98 of file Shape.cpp.
References d, KoShape::isVisible(), and Shape::Private::shape.
|
slot |
zIndex
Definition at line 68 of file Shape.cpp.
References d, Shape::Private::shape, and KoShape::zIndex().
|
friend |
|
friend |