Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-line.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_SP_LINE_H
3#define SEEN_SP_LINE_H
4
5/*
6 * SVG <line> implementation
7 *
8 * Authors:
9 * Lauris Kaplinski <lauris@kaplinski.com>
10 * Abhishek Sharma
11 * Jon A. Cruz <jon@joncruz.org>
12 *
13 * Copyright (C) 1999-2002 Lauris Kaplinski
14 *
15 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
16 */
17
18#include "svg/svg-length.h"
19#include "sp-shape.h"
20
21class SPLine final : public SPShape {
22public:
23 SPLine();
24 ~SPLine() override;
25 int tag() const override { return tag_of<decltype(*this)>; }
26
31
33 Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
34 void set(SPAttr key, char const* value) override;
35
36 const char* typeName() const override;
37 const char* displayName() const override;
39 void convert_to_guides() const override;
40 void update(SPCtx* ctx, unsigned int flags) override;
41
42 void set_shape() override;
43};
44
45#endif // SEEN_SP_LINE_H
46/*
47 Local Variables:
48 mode:c++
49 c-file-style:"stroustrup"
50 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
51 indent-tabs-mode:nil
52 fill-column:99
53 End:
54*/
55// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :
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
SVGLength x1
Definition sp-line.h:27
void set_shape() override
Definition sp-line.cpp:151
int tag() const override
Definition sp-line.h:25
SVGLength y1
Definition sp-line.h:28
SPLine()
Definition sp-line.cpp:24
void convert_to_guides() const override
Definition sp-line.cpp:119
void update(SPCtx *ctx, unsigned int flags) override
Definition sp-line.cpp:72
const char * typeName() const override
The item's type name, not node tag name.
Definition sp-line.cpp:111
Geom::Affine set_transform(Geom::Affine const &transform) override
Definition sp-line.cpp:130
SVGLength x2
Definition sp-line.h:29
~SPLine() override
const char * displayName() const override
The item's type name as a translated human string.
Definition sp-line.cpp:115
SVGLength y2
Definition sp-line.h:30
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Definition sp-line.cpp:33
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Definition sp-line.cpp:92
Inkscape::XML::Node * repr
Definition sp-object.h:193
SPDocument * document
Definition sp-object.h:188
Base class for shapes, including <path> element.
Definition sp-shape.h:38
SVG length type.
Definition svg-length.h:22
static cairo_user_data_key_t key
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94