Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-tspan.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
/*
5 * Authors: see git history
6 *
7 * Copyright (C) 2018 Authors
8 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
9 */
10#ifndef INKSCAPE_SP_TSPAN_H
11#define INKSCAPE_SP_TSPAN_H
12
13/*
14 * tspan and textpath, based on the flowtext routines
15 */
16
17#include "sp-item.h"
18#include "text-tag-attributes.h"
19
20enum {
24};
25
26class SPTSpan final : public SPItem {
27public:
28 SPTSpan();
29 ~SPTSpan() override;
30 int tag() const override { return tag_of<decltype(*this)>; }
31
32 unsigned int role : 2;
34
35 void build(SPDocument* doc, Inkscape::XML::Node* repr) override;
36 void release() override;
37 void set(SPAttr key, const char* value) override;
38 void update(SPCtx* ctx, unsigned int flags) override;
39 void modified(unsigned int flags) override;
40 Inkscape::XML::Node* write(Inkscape::XML::Document* doc, Inkscape::XML::Node* repr, unsigned int flags) override;
41
42 Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const override;
43 const char* typeName() const override;
44 const char* displayName() const override;
45};
46
47#endif /* !INKSCAPE_SP_TSPAN_H */
48
49/*
50 Local Variables:
51 mode:c++
52 c-file-style:"stroustrup"
53 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
54 indent-tabs-mode:nil
55 fill-column:99
56 End:
57*/
58// 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
Axis-aligned rectangle that can be empty.
Definition rect.h:203
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:101
Base class for visual SVG elements.
Definition sp-item.h:109
Geom::Affine transform
Definition sp-item.h:138
Inkscape::XML::Node * repr
Definition sp-object.h:193
void modified(unsigned int flags) override
Definition sp-tspan.cpp:142
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
Definition sp-tspan.cpp:59
~SPTSpan() override
void release() override
Definition sp-tspan.cpp:79
unsigned int role
Definition sp-tspan.h:32
TextTagAttributes attributes
Definition sp-tspan.h:33
int tag() const override
Definition sp-tspan.h:30
Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const override
Definition sp-tspan.cpp:158
const char * displayName() const override
The item's type name as a translated human string.
Definition sp-tspan.cpp:229
const char * typeName() const override
The item's type name, not node tag name.
Definition sp-tspan.cpp:225
Inkscape::XML::Node * write(Inkscape::XML::Document *doc, Inkscape::XML::Node *repr, unsigned int flags) override
Definition sp-tspan.cpp:178
void update(SPCtx *ctx, unsigned int flags) override
Definition sp-tspan.cpp:112
static cairo_user_data_key_t key
Some things pertinent to all visible shapes: SPItem, SPItemView, SPItemCtx.
@ SP_TSPAN_ROLE_PARAGRAPH
Definition sp-tspan.h:22
@ SP_TSPAN_ROLE_UNSPECIFIED
Definition sp-tspan.h:21
@ SP_TSPAN_ROLE_LINE
Definition sp-tspan.h:23
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94
contains and manages the attributes common to all types of text tag