Code

Fix LPEs and break mask transform undo
[inkscape.git] / src / ui / tool / shape-record.h
1 /** @file
2  * Structures that store data needed for shape editing which are not contained
3  * directly in the XML node
4  */
5 /* Authors:
6  *   Krzysztof KosiƄski <tweenk.pl@gmail.com>
7  *
8  * Copyright (C) 2009 Authors
9  * Released under GNU GPL, read the file 'COPYING' for more information
10  */
12 #ifndef SEEN_UI_TOOL_SHAPE_RECORD_H
13 #define SEEN_UI_TOOL_SHAPE_RECORD_H
15 #include <glibmm/ustring.h>
16 #include <boost/operators.hpp>
17 #include <2geom/matrix.h>
19 class SPItem;
20 namespace Inkscape {
21 namespace UI {
23 /** Role of the shape in the drawing - affects outline display and color */
24 enum ShapeRole {
25     SHAPE_ROLE_NORMAL,
26     SHAPE_ROLE_CLIPPING_PATH,
27     SHAPE_ROLE_MASK,
28     SHAPE_ROLE_LPE_PARAM // implies edit_original set to true in ShapeRecord
29 };
31 struct ShapeRecord :
32     public boost::totally_ordered<ShapeRecord>
33 {
34     SPItem *item; // SP node for the edited shape
35     Geom::Matrix edit_transform; // how to transform controls - used for clipping paths and masks
36     ShapeRole role;
37     Glib::ustring lpe_key; // This is LPE brain damage that I do not want to speak of
39     inline bool operator==(ShapeRecord const &o) const { return item == o.item; }
40     inline bool operator<(ShapeRecord const &o) const { return item < o.item; }
41 };
43 } // namespace UI
44 } // namespace Inkscape
46 #endif
48 /*
49   Local Variables:
50   mode:c++
51   c-file-style:"stroustrup"
52   c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
53   indent-tabs-mode:nil
54   fill-column:99
55   End:
56 */
57 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :