Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
box3d-side.h
Go to the documentation of this file.
1// SPDX-License-Identifier: GPL-2.0-or-later
2#ifndef SEEN_BOX3D_SIDE_H
3#define SEEN_BOX3D_SIDE_H
4
5/*
6 * 3D box face implementation
7 *
8 * Authors:
9 * Maximilian Albert <Anhalter42@gmx.de>
10 * Abhishek Sharma
11 * Jon A. Cruz <jon@joncruz.org>
12 *
13 * Copyright (C) 2007 Authors
14 *
15 * Released under GNU GPL v2+, read the file 'COPYING' for more information.
16 */
17
18#include "sp-polygon.h"
19#include "axis-manip.h"
20
21class SPBox3D;
22class Persp3D;
23
24// FIXME: Would it be better to inherit from SPPath instead?
25class Box3DSide final : public SPPolygon {
26public:
27 Box3DSide();
28 ~Box3DSide() override;
29 int tag() const override { return tag_of<decltype(*this)>; }
30
34 int getFaceId();
35 static Box3DSide * createBox3DSide(SPBox3D *box);
36
37 void build(SPDocument* doc, Inkscape::XML::Node* repr) override;
38 void set(SPAttr key, char const* value) override;
39 Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override;
40 void update(SPCtx *ctx, unsigned int flags) override;
41
42 void set_shape() override;
43
44 void position_set(); // FIXME: Replace this by Box3DSide::set_shape??
45
46 Glib::ustring axes_string() const;
47
48 Persp3D *perspective() const;
49
50
52};
53
54#endif // SEEN_BOX3D_SIDE_H
55
56/*
57 Local Variables:
58 mode:c++
59 c-file-style:"stroustrup"
60 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
61 indent-tabs-mode:nil
62 fill-column:99
63 End:
64*/
65// 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
Inkscape::XML::Node * write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags) override
Box3D::FrontOrRear front_or_rear
Definition box3d-side.h:33
void update(SPCtx *ctx, unsigned int flags) override
static Box3DSide * createBox3DSide(SPBox3D *box)
void set_shape() override
Persp3D * perspective() const
Glib::ustring axes_string() const
Box3D::Axis dir2
Definition box3d-side.h:32
int tag() const override
Definition box3d-side.h:29
Inkscape::XML::Node * convert_to_path() const
void build(SPDocument *doc, Inkscape::XML::Node *repr) override
void position_set()
~Box3DSide() override
Box3D::Axis dir1
Definition box3d-side.h:31
int getFaceId()
Interface for refcounted XML nodes.
Definition node.h:80
Typed SVG document implementation.
Definition document.h:101
Inkscape::XML::Node * repr
Definition sp-object.h:193
FrontOrRear
Definition axis-manip.h:73
static cairo_user_data_key_t key
Interface for XML documents.
Definition document.h:43
Unused.
Definition sp-object.h:94