summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-perspective_path.cpp
diff options
context:
space:
mode:
authorMartin Owens <doctormo@gmail.com>2014-03-27 01:33:44 +0000
committerMartin Owens <doctormo@gmail.com>2014-03-27 01:33:44 +0000
commit5a4fb2325f60d292b47330f540b26a3279341c90 (patch)
treed2aa7967be25450b83e625025366c618101ae49f /src/live_effects/lpe-perspective_path.cpp
parentThe Polar Arrange Tab of the Arrange Dialog now hides the parametric (diff)
parentRemove Snap menu item and improve grid menu item text (diff)
downloadinkscape-5a4fb2325f60d292b47330f540b26a3279341c90.tar.gz
inkscape-5a4fb2325f60d292b47330f540b26a3279341c90.zip
Commit a merge to trunk, with probabal errors
(bzr r11073.1.36)
Diffstat (limited to '')
-rw-r--r--src/live_effects/lpe-perspective_path.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/live_effects/lpe-perspective_path.cpp b/src/live_effects/lpe-perspective_path.cpp
index c8048f74b..c255f8665 100644
--- a/src/live_effects/lpe-perspective_path.cpp
+++ b/src/live_effects/lpe-perspective_path.cpp
@@ -11,6 +11,8 @@
* Released under GNU GPL, read the file 'COPYING' for more information
*/
+#include <glibmm/i18n.h>
+
#include "persp3d.h"
//#include "transf_mat_3x4.h"
#include "document.h"
@@ -34,7 +36,7 @@ class KnotHolderEntityOffset : public LPEKnotHolderEntity
public:
KnotHolderEntityOffset(LPEPerspectivePath *effect) : LPEKnotHolderEntity(effect) {};
virtual void knot_set(Geom::Point const &p, Geom::Point const &origin, guint state);
- virtual Geom::Point knot_get();
+ virtual Geom::Point knot_get() const;
};
} // namespace PP
@@ -69,7 +71,7 @@ LPEPerspectivePath::~LPEPerspectivePath()
}
void
-LPEPerspectivePath::doBeforeEffect (SPLPEItem *lpeitem)
+LPEPerspectivePath::doBeforeEffect (SPLPEItem const* lpeitem)
{
original_bbox(lpeitem, true);
}
@@ -147,13 +149,13 @@ void LPEPerspectivePath::addKnotHolderEntities(KnotHolder *knotholder, SPDesktop
namespace PP {
void
-KnotHolderEntityOffset::knot_set(Geom::Point const &p, Geom::Point const &origin, guint /*state*/)
+KnotHolderEntityOffset::knot_set(Geom::Point const &p, Geom::Point const &origin, guint state)
{
using namespace Geom;
LPEPerspectivePath* lpe = dynamic_cast<LPEPerspectivePath *>(_effect);
- Geom::Point const s = snap_knot_position(p);
+ Geom::Point const s = snap_knot_position(p, state);
lpe->offsetx.param_set_value((s - origin)[Geom::X]);
lpe->offsety.param_set_value(-(s - origin)[Geom::Y]); // additional minus sign is due to coordinate system flipping
@@ -163,9 +165,9 @@ KnotHolderEntityOffset::knot_set(Geom::Point const &p, Geom::Point const &origin
}
Geom::Point
-KnotHolderEntityOffset::knot_get()
+KnotHolderEntityOffset::knot_get() const
{
- LPEPerspectivePath* lpe = dynamic_cast<LPEPerspectivePath *>(_effect);
+ LPEPerspectivePath const *lpe = dynamic_cast<LPEPerspectivePath const*>(_effect);
return lpe->orig + Geom::Point(lpe->offsetx, -lpe->offsety);
}