summaryrefslogtreecommitdiffstats
path: root/src/ui/tool/shape-record.h
diff options
context:
space:
mode:
authorKrzysztof Kosi??ski <tweenk.pl@gmail.com>2009-12-05 02:48:07 +0000
committerKrzysztof Kosiński <tweenk.pl@gmail.com>2009-12-05 02:48:07 +0000
commita79eab7e518e7c1b3540075552ecb3e7aa62b0df (patch)
treebe0004871eab79010a7a5f7d98520d7e183d0621 /src/ui/tool/shape-record.h
parentGSoC node tool (diff)
downloadinkscape-a79eab7e518e7c1b3540075552ecb3e7aa62b0df.tar.gz
inkscape-a79eab7e518e7c1b3540075552ecb3e7aa62b0df.zip
Fix mask editing behavior on undo and outline display for masks/clips;
prepare to fix LPE path parameters (bzr r8846.2.2)
Diffstat (limited to 'src/ui/tool/shape-record.h')
-rw-r--r--src/ui/tool/shape-record.h56
1 files changed, 56 insertions, 0 deletions
diff --git a/src/ui/tool/shape-record.h b/src/ui/tool/shape-record.h
new file mode 100644
index 000000000..cc2f8be40
--- /dev/null
+++ b/src/ui/tool/shape-record.h
@@ -0,0 +1,56 @@
+/** @file
+ * Structures that store data needed for shape editing which are not contained
+ * directly in the XML node
+ */
+/* Authors:
+ * Krzysztof Kosiński <tweenk.pl@gmail.com>
+ *
+ * Copyright (C) 2009 Authors
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#ifndef SEEN_UI_TOOL_SHAPE_RECORD_H
+#define SEEN_UI_TOOL_SHAPE_RECORD_H
+
+#include <boost/operators.hpp>
+#include <2geom/matrix.h>
+
+class SPItem;
+namespace Inkscape {
+namespace UI {
+
+/** Role of the shape in the drawing - affects outline display and color */
+enum ShapeRole {
+ SHAPE_ROLE_NORMAL,
+ SHAPE_ROLE_CLIPPING_PATH,
+ SHAPE_ROLE_MASK,
+ SHAPE_ROLE_LPE_PARAM // implies edit_original set to true in ShapeRecord
+};
+
+struct ShapeRecord :
+ public boost::totally_ordered<ShapeRecord>
+{
+ SPItem *item; // SP node for the edited shape
+ Geom::Matrix edit_transform; // how to transform controls - used for clipping paths and masks
+ ShapeRole role;
+ bool edit_original; // whether to use original-d instead of d for editing
+
+ inline bool operator==(ShapeRecord const &o) const { return item == o.item; }
+ inline bool operator<(ShapeRecord const &o) const { return item < o.item; }
+};
+
+} // namespace UI
+} // namespace Inkscape
+
+#endif
+
+/*
+ Local Variables:
+ mode:c++
+ c-file-style:"stroustrup"
+ c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
+ indent-tabs-mode:nil
+ fill-column:99
+ End:
+*/
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :