Krita Source Code Documentation
Loading...
Searching...
No Matches
VectorLayer.h
Go to the documentation of this file.
1/*
2 * SPDX-FileCopyrightText: 2017 Wolthera van Hövell tot Westerflier <griffinvalley@gmail.com>
3 *
4 * SPDX-License-Identifier: LGPL-2.0-or-later
5 */
6#ifndef LIBKIS_VECTORLAYER_H
7#define LIBKIS_VECTORLAYER_H
8
9#include <QObject>
10
11#include <kis_types.h>
12
13#include "kritalibkis_export.h"
14#include "libkis.h"
15
17
18#include "Node.h"
19#include "Shape.h"
20
31class KRITALIBKIS_EXPORT VectorLayer : public Node
32{
33 Q_OBJECT
34 Q_DISABLE_COPY(VectorLayer)
35
36public:
37 explicit VectorLayer(KoShapeControllerBase* shapeController, KisImageSP image, QString name, QObject *parent = 0);
38 explicit VectorLayer(KisShapeLayerSP layer, QObject *parent = 0);
39 ~VectorLayer() override;
40public Q_SLOTS:
41
48 virtual QString type() const override;
49
54 QList<Shape *> shapes() const;
55
61 QString toSvg();
62
69 QList<Shape *> addShapesFromSvg(const QString &svg);
70
77 Shape* shapeAtPosition(const QPointF &position) const;
78
87 QList<Shape *> shapesInRect(const QRectF &rect, bool omitHiddenShapes = true, bool containedMode = false) const;
88
96 Shape* createGroupShape(const QString &name, QList<Shape *> shapes) const;
97
102 bool isAntialiased() const;
103
108 void setAntialiased(const bool antialiased);
109};
110
111#endif // LIBKIS_VECTORLAYER_H
112
Definition Node.h:24
virtual QString type() const
type Krita has several types of nodes, split in layers and masks. Group layers can contain other laye...
Definition Node.cpp:463
friend class VectorLayer
Definition Node.h:702
The Shape class The shape class is a wrapper around Krita's vector objects.
Definition Shape.h:38
The VectorLayer class A vector layer is a special layer that stores and shows vector shapes.
Definition VectorLayer.h:32