Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
sp-symbol.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_SP_SYMBOL_H
3#define SEEN_SP_SYMBOL_H
4
5/*
6 * SVG <symbol> implementation
7 *
8 * Authors:
9 * Lauris Kaplinski <lauris@kaplinski.com>
10 *
11 * Copyright (C) 1999-2003 Lauris Kaplinski
12 *
13 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
14 */
15
16/*
17 * This is quite similar in logic to <svg>
18 * Maybe we should merge them somehow (Lauris)
19 */
20
21#include <2geom/affine.h>
22#include "sp-dimensions.h"
23#include "sp-item-group.h"
24#include "viewbox.h"
25
26class SPSymbol final : public SPGroup, public SPViewBox, public SPDimensions {
27public:
28 SPSymbol();
29 ~SPSymbol() override;
30 int tag() const override { return tag_of<decltype(*this)>; }
31
33 void release() override;
34 void set(SPAttr key, char const* value) override;
35 void update(SPCtx *ctx, unsigned int flags) override;
36 void unSymbol();
38
39 void modified(unsigned int flags) override;
41
42 std::optional<Geom::PathVector> documentExactBounds() const override;
43 Inkscape::DrawingItem* show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) override;
44 void print(SPPrintContext *ctx) override;
45 Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const override;
46 void hide (unsigned int key) override;
47
48public:
49 // reference point
52};
53
54#endif
3x3 affine transformation matrix.
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
SVG drawing item for display.
Interface for refcounted XML nodes.
Definition node.h:80
SVGLength x
Typed SVG document implementation.
Definition document.h:101
Geom::Affine transform
Definition sp-item.h:138
Inkscape::XML::Node * repr
Definition sp-object.h:193
SPDocument * document
Definition sp-object.h:188
void modified(unsigned int flags) override
int tag() const override
Definition sp-symbol.h:30
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
SVGLength refY
Definition sp-symbol.h:51
void print(SPPrintContext *ctx) override
~SPSymbol() override
Inkscape::DrawingItem * show(Inkscape::Drawing &drawing, unsigned int key, unsigned int flags) override
void build(SPDocument *document, Inkscape::XML::Node *repr) override
Definition sp-symbol.cpp:43
Geom::OptRect bbox(Geom::Affine const &transform, SPItem::BBoxType type) const override
void unSymbol()
SVGLength refX
Definition sp-symbol.h:50
void child_added(Inkscape::XML::Node *child, Inkscape::XML::Node *ref) override
void update(SPCtx *ctx, unsigned int flags) override
void release() override
Definition sp-symbol.cpp:58
std::optional< Geom::PathVector > documentExactBounds() const override
Get an exact geometric shape representing the visual bounds of the item in the document coordinates.
void hide(unsigned int key) override
SVG length type.
Definition svg-length.h:22
static cairo_user_data_key_t key
Ocnode * child[8]
Definition quantize.cpp:33
Ocnode ** ref
Definition quantize.cpp:32
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94