summaryrefslogtreecommitdiffstats
path: root/src/live_effects/parameter/filletchamferpointarray.cpp
diff options
context:
space:
mode:
authorJabier Arraiza Cenoz <jabier.arraiza@marker.es>2014-12-02 18:39:33 +0000
committerJabiertxof <jtx@jtx.marker.es>2014-12-02 18:39:33 +0000
commit09e2f7b62d13537a0f006fc9953c533802fd9c12 (patch)
tree78c1a72538f0e60e38c3ca1845a909fcad53f394 /src/live_effects/parameter/filletchamferpointarray.cpp
parentadding fussion improvements (diff)
parentExtensions. Fix for Bug #1192746 (e key does not start export on firefox [Jes... (diff)
downloadinkscape-09e2f7b62d13537a0f006fc9953c533802fd9c12.tar.gz
inkscape-09e2f7b62d13537a0f006fc9953c533802fd9c12.zip
update to trunk
(bzr r13708.1.4)
Diffstat (limited to 'src/live_effects/parameter/filletchamferpointarray.cpp')
-rw-r--r--src/live_effects/parameter/filletchamferpointarray.cpp27
1 files changed, 2 insertions, 25 deletions
diff --git a/src/live_effects/parameter/filletchamferpointarray.cpp b/src/live_effects/parameter/filletchamferpointarray.cpp
index 4e2be6e88..7d8c8e9b0 100644
--- a/src/live_effects/parameter/filletchamferpointarray.cpp
+++ b/src/live_effects/parameter/filletchamferpointarray.cpp
@@ -693,28 +693,6 @@ void FilletChamferPointArrayParam::set_oncanvas_looks(SPKnotShapeType shape,
knot_mode = mode;
knot_color = color;
}
-/*
-class FilletChamferPointArrayParamKnotHolderEntity : public KnotHolderEntity {
-public:
- FilletChamferPointArrayParamKnotHolderEntity(FilletChamferPointArrayParam
-*p, unsigned int index);
- virtual ~FilletChamferPointArrayParamKnotHolderEntity() {}
-
- virtual void knot_set(Point const &p, Point const &origin, guint state);
- virtual Point knot_get() const;
- virtual void knot_click(guint state);
- virtual void knot_doubleclicked(guint state);
-
- /Checks whether the index falls within the size of the parameter's vector/
- bool valid_index(unsigned int index) const {
- return (_pparam->_vector.size() > index);
- };
-
-private:
- FilletChamferPointArrayParam *_pparam;
- unsigned int _index;
-};
-/*/
FilletChamferPointArrayParamKnotHolderEntity::
FilletChamferPointArrayParamKnotHolderEntity(
@@ -730,11 +708,10 @@ void FilletChamferPointArrayParamKnotHolderEntity::knot_set(Point const &p,
if (!valid_index(_index)) {
return;
}
- /// @todo how about item transforms???
Piecewise<D2<SBasis> > const &pwd2 = _pparam->get_pwd2();
- //todo: add snapping
- Geom::Point const s = snap_knot_position(p, state);
double t = nearest_point(p, pwd2[_index]);
+ Geom::Point const s = snap_knot_position(pwd2[_index].valueAt(t), state);
+ t = nearest_point(s, pwd2[_index]);
if (t == 1) {
t = 0.9999;
}