150 if (!
d->
shape)
return false;
153 bool removeStatus =
false;
158 if (view && view->document() == document->document()) {
160 view->image()->waitForDone();
174 QBuffer shapesBuffer;
175 QBuffer stylesBuffer;
177 shapesBuffer.open(QIODevice::WriteOnly);
178 stylesBuffer.open(QIODevice::WriteOnly);
187 shapesBuffer.close();
188 stylesBuffer.close();
190 return (prependStyles ? QString::fromUtf8(stylesBuffer.data()):
"") + QString::fromUtf8(shapesBuffer.data());
215 if (!
d->
shape)
return false;
KoShapeManager shapeManager
QPointer< KisView > activeView
static KisPart * instance()
KisMainWindow * currentMainwindow() const
QList< QPointer< KisView > > views
static void runSingleCommandStroke(KisImageSP image, KUndo2Command *cmd, KisStrokeJobData::Sequentiality sequentiality=KisStrokeJobData::SEQUENTIAL, KisStrokeJobData::Exclusivity exclusivity=KisStrokeJobData::NORMAL)
runSingleCommandStroke creates a stroke and runs cmd in it. The text() field of cmd is used as a titl...
KisCanvas2 * canvasBase() const
bool isSelected(const KoShape *shape) const
return true if the shape is selected
void deselect(KoShape *shape)
void select(KoShape *shape)
void setName(const QString &name)
void setZIndex(qint16 zIndex)
bool isSelectable() const
bool isGeometryProtected() const
virtual QRectF boundingRect() const
Get the bounding box of the shape.
void setSelectable(bool selectable)
virtual void update() const
KoShapeContainer * parent() const
QTransform absoluteTransformation() const
void setTransformation(const QTransform &matrix)
QTransform transformation() const
Returns the shapes local transformation matrix.
virtual void setPosition(const QPointF &position)
Set the position of the shape in pt.
virtual void updateAbsolute(const QRectF &rect) const
void setGeometryProtected(bool on)
bool isVisible(bool recursive=true) const
QPointF position() const
Get the position of the shape in pt.
Document * activeDocument() const
static Krita * instance()
instance retrieve the singleton instance of the Application object.
The Shape class The shape class is a wrapper around Krita's vector objects.
void setVisible(bool visible)
setVisible
bool operator==(const Shape &other) const
bool remove()
remove delete the shape.
QTransform absoluteTransformation() const
transformation the 2D transformation matrix of the shape including all grandparent transforms.
void update()
update queue the shape update.
QTransform transformation() const
transformation the 2D transformation matrix of the shape.
bool selectable() const
selectable
bool operator!=(const Shape &other) const
QRectF boundingBox() const
boundingBox the bounding box of the shape in points
bool isSelected()
isSelected
void setTransformation(QTransform matrix)
setTransformation set the 2D transformation matrix of the shape.
virtual QString type() const
type
void setName(const QString &name)
setName
void setZIndex(int zindex)
setZIndex
Shape * parentShape() const
parentShape
void updateAbsolute(QRectF box)
updateAbsolute queue the shape update in the specified rectangle.
void setPosition(QPointF point)
setPosition set the position of the shape.
QPointF position() const
position the position of the shape in points.
QString toSvg(bool prependStyles=false, bool stripTextMode=true)
toSvg convert the shape to svg, will not include style definitions.
bool geometryProtected() const
geometryProtected
void setGeometryProtected(bool protect)
setGeometryProtected
void setSelectable(bool selectable)
setSelectable
Shape(KoShape *shape, QObject *parent=0)
void select()
select selects the shape.
bool visible() const
visible
void deselect()
deselect deselects the shape.
Context for saving svg files.
void setStrippedTextMode(bool value)
Implements exporting shapes to SVG.
bool saveDetached(QIODevice &outputDevice)