summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: f9cb5a9)
raw | patch | inline | side by side (parent: f9cb5a9)
author | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 25 Apr 2007 22:59:03 +0000 (22:59 +0000) | ||
committer | cilix42 <cilix42@users.sourceforge.net> | |
Wed, 25 Apr 2007 22:59:03 +0000 (22:59 +0000) |
src/nodepath.cpp | patch | blob | history |
diff --git a/src/nodepath.cpp b/src/nodepath.cpp
index 0ad4c66a030c190776b9c53cc158dd6c1ea7ae5e..6c558149c172c598e8e2883e66da16376a31b7a1 100644 (file)
--- a/src/nodepath.cpp
+++ b/src/nodepath.cpp
@@ -3662,10 +3662,16 @@ void sp_nodepath_selected_nodes_rotate(Inkscape::NodePath::Path *nodepath, gdoub
rot = angle;
}
+ NR::Point rot_center;
+ if (Inkscape::NodePath::Path::active_node == NULL)
+ rot_center = box.midpoint();
+ else
+ rot_center = Inkscape::NodePath::Path::active_node->pos;
+
NR::Matrix t =
- NR::Matrix (NR::translate(-box.midpoint())) *
+ NR::Matrix (NR::translate(-rot_center)) *
NR::Matrix (NR::rotate(rot)) *
- NR::Matrix (NR::translate(box.midpoint()));
+ NR::Matrix (NR::translate(rot_center));
for (GList *l = nodepath->selected; l != NULL; l = l->next) {
Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) l->data;
@@ -3787,10 +3793,16 @@ void sp_nodepath_selected_nodes_scale(Inkscape::NodePath::Path *nodepath, gdoubl
double scale = (box.maxExtent() + grow)/box.maxExtent();
+ NR::Point scale_center;
+ if (Inkscape::NodePath::Path::active_node == NULL)
+ scale_center = box.midpoint();
+ else
+ scale_center = Inkscape::NodePath::Path::active_node->pos;
+
NR::Matrix t =
- NR::Matrix (NR::translate(-box.midpoint())) *
+ NR::Matrix (NR::translate(-scale_center)) *
NR::Matrix (NR::scale(scale, scale)) *
- NR::Matrix (NR::translate(box.midpoint()));
+ NR::Matrix (NR::translate(scale_center));
for (GList *l = nodepath->selected; l != NULL; l = l->next) {
Inkscape::NodePath::Node *n = (Inkscape::NodePath::Node *) l->data;