summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-06-18 02:27:45 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-06-18 02:27:45 +0000
commit6df5d1a03c84baab1bd08a5cdf047373a6afd5b9 (patch)
treec0fb3d3109cb06c3ee1b6419c4ab6cbcb78f7224 /src
parentAdd handle to adjust angle (diff)
downloadinkscape-6df5d1a03c84baab1bd08a5cdf047373a6afd5b9.tar.gz
inkscape-6df5d1a03c84baab1bd08a5cdf047373a6afd5b9.zip
Oops! Fix compile.
(bzr r5980)
Diffstat (limited to 'src')
-rw-r--r--src/live_effects/lpe-copy_rotate.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/live_effects/lpe-copy_rotate.cpp b/src/live_effects/lpe-copy_rotate.cpp
index 52ac7d6be..40a4b1a54 100644
--- a/src/live_effects/lpe-copy_rotate.cpp
+++ b/src/live_effects/lpe-copy_rotate.cpp
@@ -67,9 +67,13 @@ LPECopyRotate::~LPECopyRotate()
void
LPECopyRotate::doOnApply(SPLPEItem *lpeitem)
{
- origin.param_setValue(SP_SHAPE(lpeitem)->curve->first_point().to_2geom());
- A = pwd2_in.firstValue();
- B = pwd2_in.lastValue();
+ SPCurve *curve = SP_SHAPE(lpeitem)->curve;
+
+ A = curve->first_point().to_2geom();
+ B = curve->last_point().to_2geom();
+
+ origin.param_setValue(A);
+
dir = unit_vector(B - A);
dist_angle_handle = L2(B - A);
}
@@ -121,7 +125,11 @@ KnotHolderEntityAngle::knot_set(NR::Point const &p, NR::Point const &/*origin*/,
// FIXME: is the minus sign due to a bug in 2geom?
lpe->angle.param_set_value(rad_to_deg(-angle_between(lpe->dir, p.to_2geom() - lpe->origin)));
- lpe->dist_angle_handle = L2(p - lpe->origin);
+ if (state & GDK_SHIFT_MASK) {
+ lpe->dist_angle_handle = L2(lpe->B - lpe->A);
+ } else {
+ lpe->dist_angle_handle = L2(p - lpe->origin);
+ }
// FIXME: this should not directly ask for updating the item. It should write to SVG, which triggers updating.
sp_lpe_item_update_patheffect (SP_LPE_ITEM(item), false, true);