Krita Source Code Documentation
Loading...
Searching...
No Matches
RectangleShape.h
Go to the documentation of this file.
1/* This file is part of the KDE project
2 SPDX-FileCopyrightText: 2006-2007 Thorsten Zachmann <zachmann@kde.org>
3 SPDX-FileCopyrightText: 2006-2007 Jan Hambrecht <jaham@gmx.net>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef KORECTANGLESHAPE_H
9#define KORECTANGLESHAPE_H
10
11#include "KoParameterShape.h"
12#include <SvgShape.h>
13
14#define RectangleShapeId "RectangleShape"
15
22{
23public:
25 ~RectangleShape() override;
26
27 KoShape* cloneShape() const override;
28
30 qreal cornerRadiusX() const;
31
40 void setCornerRadiusX(qreal radius);
41
43 qreal cornerRadiusY() const;
44
53 void setCornerRadiusY(qreal radius);
55 QString pathShapeId() const override;
56
58 bool saveSvg(SvgSavingContext &context) override;
59
61 bool loadSvg(const QDomElement &element, SvgLoadingContext &context) override;
62
63protected:
65
66 void moveHandleAction(int handleId, const QPointF &point, Qt::KeyboardModifiers modifiers = Qt::NoModifier) override;
67 void updatePath(const QSizeF &size) override;
68 void createPoints(int requiredPointCount);
69 void updateHandles();
70
71private:
74};
75
76#endif /* KORECTANGLESHAPE_H */
77
QSizeF size() const override
reimplemented
qreal cornerRadiusX() const
Returns the corner radius in x-direction.
void moveHandleAction(int handleId, const QPointF &point, Qt::KeyboardModifiers modifiers=Qt::NoModifier) override
Updates the internal state of a KoParameterShape.
QString pathShapeId() const override
reimplemented
~RectangleShape() override
void setCornerRadiusY(qreal radius)
void setCornerRadiusX(qreal radius)
qreal m_cornerRadiusX
in percent of half of the rectangle width (a number between 0 and 100)
qreal cornerRadiusY() const
Returns the corner radius in y-direction.
KoShape * cloneShape() const override
creates a deep copy of the shape or shape's subtree
void createPoints(int requiredPointCount)
void updatePath(const QSizeF &size) override
Update the path of the parameter shape.
bool loadSvg(const QDomElement &element, SvgLoadingContext &context) override
reimplemented from SvgShape
bool saveSvg(SvgSavingContext &context) override
reimplemented from SvgShape
qreal m_cornerRadiusY
in percent of half of the rectangle height (a number between 0 and 100)
Contains data used for loading svg.
Context for saving svg files.
An interface providing svg loading and saving routines.
Definition SvgShape.h:18