Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-path.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_SP_PATH_H
3#define SEEN_SP_PATH_H
4
5/*
6 * SVG <path> implementation
7 *
8 * Authors:
9 * Lauris Kaplinski <lauris@kaplinski.com>
10 * Ximian, Inc.
11 * Johan Engelen
12 *
13 * Copyright (C) 1999-2002 Lauris Kaplinski
14 * Copyright (C) 2000-2001 Ximian, Inc.
15 * Copyright (C) 1999-2012 Authors
16 *
17 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
18 */
19
20#include "sp-shape.h"
21#include "sp-conn-end-pair.h"
22#include "style-internal.h" // For SPStyleSrc
23
27class SPPath final : public SPShape {
28public:
29 SPPath();
30 ~SPPath() override;
31 int tag() const override { return tag_of<decltype(*this)>; }
32
33 int nodesInPath() const;
34 friend class SPConnEndPair;
36
38 void release() override;
39 void update(SPCtx* ctx, unsigned int flags) override;
40
41 void set(SPAttr key, char const* value) override;
42 void update_patheffect(bool write) override;
43 Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
44
45 const char* typeName() const override;
46 const char* displayName() const override;
47 char* description() const override;
49 void removeTransformsRecursively(SPObject const *root) override;
50 void convert_to_guides() const override;
51private:
52 SPStyleSrc d_source; // Source of 'd' value, saved for output.
53};
54
55#endif // SEEN_SP_PATH_H
56
57/*
58 Local Variables:
59 mode:c++
60 c-file-style:"stroustrup"
61 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
62 indent-tabs-mode:nil
63 fill-column:99
64 End:
65*/
66// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :
SPAttr
Definition attributes.h:27
constexpr int tag_of
Convenience function to retrieve the tag (class id) of a given type.
Definition cast.h:26
3x3 matrix representing an affine transformation.
Definition affine.h:70
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:101
Geom::Affine transform
Definition sp-item.h:138
SPObject is an abstract base class of all of the document nodes at the SVG document level.
Definition sp-object.h:160
Inkscape::XML::Node * repr
Definition sp-object.h:193
SPDocument * document
Definition sp-object.h:188
SVG <path> implementation.
Definition sp-path.h:27
SPConnEndPair connEndPair
Definition sp-path.h:35
void removeTransformsRecursively(SPObject const *root) override
Definition sp-path.cpp:317
~SPPath() override
Geom::Affine set_transform(Geom::Affine const &transform) override
Definition sp-path.cpp:284
const char * typeName() const override
The item's type name, not node tag name.
Definition sp-path.cpp:47
int nodesInPath() const
Definition sp-path.cpp:42
int tag() const override
Definition sp-path.h:31
char * description() const override
Definition sp-path.cpp:55
void release() override
Definition sp-path.cpp:185
SPStyleSrc d_source
Definition sp-path.h:52
void update_patheffect(bool write) override
Definition sp-path.cpp:271
const char * displayName() const override
The item's type name as a translated human string.
Definition sp-path.cpp:51
void convert_to_guides() const override
Definition sp-path.cpp:85
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Definition sp-path.cpp:241
void update(SPCtx *ctx, unsigned int flags) override
Definition sp-path.cpp:275
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Definition sp-path.cpp:113
Base class for shapes, including <path> element.
Definition sp-shape.h:38
RootCluster root
static cairo_user_data_key_t key
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94
SPStyle internal: classes that are internal to SPStyle.
SPStyleSrc