summaryrefslogtreecommitdiffstats
path: root/src/ui/tools/tweak-tool.h
diff options
context:
space:
mode:
authorMarkus Engel <markus.engel@tum.de>2013-11-09 22:36:13 +0000
committerMarkus Engel <markus.engel@tum.de>2013-11-09 22:36:13 +0000
commitc04e30df241a3ee039077425bab9b9c37abe2854 (patch)
tree6b7904966a289832bca2636c3117c893592e5ddd /src/ui/tools/tweak-tool.h
parentadded missing translation flags and a small text change (diff)
downloadinkscape-c04e30df241a3ee039077425bab9b9c37abe2854.tar.gz
inkscape-c04e30df241a3ee039077425bab9b9c37abe2854.zip
Moved and renamed some tool-related files.
(bzr r12785)
Diffstat (limited to 'src/ui/tools/tweak-tool.h')
-rw-r--r--src/ui/tools/tweak-tool.h106
1 files changed, 106 insertions, 0 deletions
diff --git a/src/ui/tools/tweak-tool.h b/src/ui/tools/tweak-tool.h
new file mode 100644
index 000000000..6cbb9aded
--- /dev/null
+++ b/src/ui/tools/tweak-tool.h
@@ -0,0 +1,106 @@
+#ifndef __SP_TWEAK_CONTEXT_H__
+#define __SP_TWEAK_CONTEXT_H__
+
+/*
+ * tweaking paths without node editing
+ *
+ * Authors:
+ * bulia byak
+ *
+ * Copyright (C) 2007 authors
+ *
+ * Released under GNU GPL, read the file 'COPYING' for more information
+ */
+
+#include "ui/tools/tool-base.h"
+#include <2geom/point.h>
+
+#define SAMPLING_SIZE 8 /* fixme: ?? */
+
+#define TC_MIN_PRESSURE 0.0
+#define TC_MAX_PRESSURE 1.0
+#define TC_DEFAULT_PRESSURE 0.35
+
+namespace Inkscape {
+namespace UI {
+namespace Tools {
+
+enum {
+ TWEAK_MODE_MOVE,
+ TWEAK_MODE_MOVE_IN_OUT,
+ TWEAK_MODE_MOVE_JITTER,
+ TWEAK_MODE_SCALE,
+ TWEAK_MODE_ROTATE,
+ TWEAK_MODE_MORELESS,
+ TWEAK_MODE_PUSH,
+ TWEAK_MODE_SHRINK_GROW,
+ TWEAK_MODE_ATTRACT_REPEL,
+ TWEAK_MODE_ROUGHEN,
+ TWEAK_MODE_COLORPAINT,
+ TWEAK_MODE_COLORJITTER,
+ TWEAK_MODE_BLUR
+};
+
+class TweakTool : public ToolBase {
+public:
+ TweakTool();
+ virtual ~TweakTool();
+
+ /* extended input data */
+ gdouble pressure;
+
+ /* attributes */
+ guint dragging : 1; /* mouse state: mouse is dragging */
+ guint usepressure : 1;
+ guint usetilt : 1;
+
+ double width;
+ double force;
+ double fidelity;
+
+ gint mode;
+
+ bool is_drawing;
+
+ bool is_dilating;
+ bool has_dilated;
+ Geom::Point last_push;
+ SPCanvasItem *dilate_area;
+
+ bool do_h;
+ bool do_s;
+ bool do_l;
+ bool do_o;
+
+ sigc::connection style_set_connection;
+
+ static const std::string prefsPath;
+
+ virtual void setup();
+ virtual void set(const Inkscape::Preferences::Entry& val);
+ virtual bool root_handler(GdkEvent* event);
+
+ virtual const std::string& getPrefsPath();
+
+ void update_cursor(bool with_shift);
+
+private:
+ bool set_style(const SPCSSAttr* css);
+};
+
+}
+}
+}
+
+#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:fileencoding=utf-8:textwidth=99 :