Code

Node tool: snap while scaling a selection of nodes. Consider this as experimental...
[inkscape.git] / src / ui / tool / control-point-selection.h
index 514ecb2e3df13d6eb1940f16ae39def34cde88e2..0e5acf6c5cc84e05151f5f8de19915117a02f20a 100644 (file)
@@ -1,5 +1,5 @@
 /** @file
- * Node selection - stores a set of nodes and applies transformations
+ * Control point selection - stores a set of control points and applies transformations
  * to them
  */
 /* Authors:
@@ -9,8 +9,8 @@
  * Released under GNU GPL, read the file 'COPYING' for more information
  */
 
-#ifndef SEEN_UI_TOOL_NODE_SELECTION_H
-#define SEEN_UI_TOOL_NODE_SELECTION_H
+#ifndef SEEN_UI_TOOL_CONTROL_POINT_SELECTION_H
+#define SEEN_UI_TOOL_CONTROL_POINT_SELECTION_H
 
 #include <memory>
 #include <boost/optional.hpp>
 #include <2geom/forward.h>
 #include <2geom/point.h>
 #include <2geom/rect.h>
-#include "display/display-forward.h"
 #include "util/accumulators.h"
 #include "util/unordered-containers.h"
 #include "ui/tool/commit-events.h"
 #include "ui/tool/manipulator.h"
+#include "snap-candidate.h"
 
 class SPDesktop;
+struct SPCanvasGroup;
 
 namespace Inkscape {
 namespace UI {
@@ -108,6 +109,10 @@ public:
     sigc::signal<void> signal_update;
     sigc::signal<void, SelectableControlPoint *, bool> signal_point_changed;
     sigc::signal<void, CommitEvent> signal_commit;
+
+    std::vector<Inkscape::SnapCandidatePoint> getOriginalPoints();
+    void setOriginalPoints();
+
 private:
     // The functions below are invoked from SelectableControlPoint.
     // Previously they were connected to handlers when selecting, but this
@@ -132,6 +137,7 @@ private:
     set_type _points;
     set_type _all_points;
     INK_UNORDERED_MAP<SelectableControlPoint *, Geom::Point> _original_positions;
+    INK_UNORDERED_MAP<SelectableControlPoint *, Geom::Matrix> _last_trans;
     boost::optional<double> _rot_radius;
     boost::optional<double> _mouseover_rot_radius;
     Geom::OptRect _bounds;
@@ -158,4 +164,4 @@ private:
   fill-column:99
   End:
 */
-// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:encoding=utf-8:textwidth=99 :
+// vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99 :