~inkscape.dev/inkscape/trunk

9978.1.1 by Jon A. Cruz
Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
1
#ifndef SEEN_SP_PATH_H
2
#define SEEN_SP_PATH_H
1 by mental
moving trunk for module inkscape
3
4
/*
5
 * SVG <path> implementation
6
 *
7
 * Authors:
8
 *   Lauris Kaplinski <lauris@kaplinski.com>
10897 by Johan Engelen
turn SPPath into a class, and add some methods...
9
 *   Ximian, Inc.
10
 *   Johan Engelen
1 by mental
moving trunk for module inkscape
11
 *
12
 * Copyright (C) 1999-2002 Lauris Kaplinski
13
 * Copyright (C) 2000-2001 Ximian, Inc.
10897 by Johan Engelen
turn SPPath into a class, and add some methods...
14
 * Copyright (C) 1999-2012 Authors
1 by mental
moving trunk for module inkscape
15
 *
16
 * Released under GNU GPL, read the file 'COPYING' for more information
17
 */
18
19
#include "sp-shape.h"
20
#include "sp-conn-end-pair.h"
21
10897 by Johan Engelen
turn SPPath into a class, and add some methods...
22
class SPCurve;
1 by mental
moving trunk for module inkscape
23
11608.1.123 by Markus Engel
Added runtime check in SP_-cast macros.
24
#define SP_PATH(obj) (dynamic_cast<SPPath*>((SPObject*)obj))
11608.1.122 by Markus Engel
Modified SP_IS_ macros.
25
#define SP_IS_PATH(obj) (dynamic_cast<const SPPath*>((SPObject*)obj) != NULL)
1 by mental
moving trunk for module inkscape
26
10897 by Johan Engelen
turn SPPath into a class, and add some methods...
27
/**
28
 * SVG <path> implementation
29
 */
11608.1.76 by Markus Engel
Merged Shape and subclasses. Cleaned up a bit.
30
class SPPath : public SPShape {
10897 by Johan Engelen
turn SPPath into a class, and add some methods...
31
public:
11608.1.67 by Markus Engel
Added constructors to SP classes.
32
	SPPath();
11608.1.72 by Markus Engel
Cleaned up a bit. Uses some C++11 features.
33
	virtual ~SPPath();
34
13341.1.190 by Liam P. White
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
35
    int nodesInPath() const;
10897 by Johan Engelen
turn SPPath into a class, and add some methods...
36
37
    // still in lowercase because the names should be clearer on whether curve, curve->copy or curve-ref is returned.
38
    void     set_original_curve (SPCurve *curve, unsigned int owner, bool write);
39
    SPCurve* get_original_curve () const;
40
    SPCurve* get_curve_for_edit () const;
41
    const SPCurve* get_curve_reference() const;
42
43
public: // should be made protected
44
    SPCurve* get_curve();
45
    friend class SPConnEndPair;
46
47
public:
1 by mental
moving trunk for module inkscape
48
    SPConnEndPair connEndPair;
11608.1.8 by Markus Engel
Added "virtual pad" to SPPath.
49
11608.1.57 by Markus Engel
Renamed virtual function names.
50
	virtual void build(SPDocument *document, Inkscape::XML::Node *repr);
51
	virtual void release();
13341.1.190 by Liam P. White
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
52
	virtual void update(SPCtx* ctx, unsigned int flags);
11608.1.57 by Markus Engel
Renamed virtual function names.
53
13341.1.190 by Liam P. White
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
54
	virtual void set(unsigned int key, char const* value);
55
	virtual Inkscape::XML::Node* write(Inkscape::XML::Document *xml_doc, Inkscape::XML::Node *repr, unsigned int flags);
11608.1.57 by Markus Engel
Renamed virtual function names.
56
12729 by Markus Engel
Added some consts.
57
        virtual const char* displayName() const;
13341.1.190 by Liam P. White
Header cleanup: stop using Glib types where they aren't truly needed. Eases GThread deprecation errors.
58
	virtual char* description() const;
11608.1.57 by Markus Engel
Renamed virtual function names.
59
	virtual Geom::Affine set_transform(Geom::Affine const &transform);
12729 by Markus Engel
Added some consts.
60
    virtual void convert_to_guides() const;
11608.1.57 by Markus Engel
Renamed virtual function names.
61
62
    virtual void update_patheffect(bool write);
11608.1.8 by Markus Engel
Added "virtual pad" to SPPath.
63
};
64
9978.1.1 by Jon A. Cruz
Split SPCanvasItem and SPCanvasGroup to individual .h files. Removed forward header.
65
#endif // SEEN_SP_PATH_H
1 by mental
moving trunk for module inkscape
66
67
/*
68
  Local Variables:
69
  mode:c++
70
  c-file-style:"stroustrup"
71
  c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
72
  indent-tabs-mode:nil
73
  fill-column:99
74
  End:
75
*/
76
// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :