summaryrefslogtreecommitdiffstats
path: root/src/live_effects
diff options
context:
space:
mode:
authorMaximilian Albert <maximilian.albert@gmail.com>2008-07-30 10:57:19 +0000
committercilix42 <cilix42@users.sourceforge.net>2008-07-30 10:57:19 +0000
commit7b0dc58302db5c0aac748bc6c9c3b0889e109d88 (patch)
treea7a0ca6b15f15830acb7d170eaf803191a840a2d /src/live_effects
parentNew 'internal' TextParam which doesn't display a widget (useful if the text s... (diff)
downloadinkscape-7b0dc58302db5c0aac748bc6c9c3b0889e109d88.tar.gz
inkscape-7b0dc58302db5c0aac748bc6c9c3b0889e109d88.zip
Move coordinate transform workaround to a more logical place
(bzr r6471)
Diffstat (limited to 'src/live_effects')
-rw-r--r--src/live_effects/lpe-ruler.cpp2
-rw-r--r--src/live_effects/parameter/text.cpp3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp
index e90163781..f41e752cb 100644
--- a/src/live_effects/lpe-ruler.cpp
+++ b/src/live_effects/lpe-ruler.cpp
@@ -93,7 +93,7 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_i
g_free(dist);
double angle = Geom::angle_between(dir, Geom::Point(1,0));
- info_text.setPos(inkscape_active_desktop()->doc2dt((A + B) / 2 + 2.0 * n).to_2geom());
+ info_text.setPos((A + B) / 2 + 2.0 * n);
info_text.setAnchor(std::sin(angle), -std::cos(angle));
Point C, D;
diff --git a/src/live_effects/parameter/text.cpp b/src/live_effects/parameter/text.cpp
index f55dca4d8..fab69578a 100644
--- a/src/live_effects/parameter/text.cpp
+++ b/src/live_effects/parameter/text.cpp
@@ -31,7 +31,8 @@ TextParam::TextParam( const Glib::ustring& label, const Glib::ustring& tip,
value(default_value),
defvalue(default_value)
{
- canvas_text = (SPCanvasText *) sp_canvastext_new(sp_desktop_tempgroup(inkscape_active_desktop()), Geom::Point(0,0), "");
+ SPDesktop *desktop = inkscape_active_desktop(); // FIXME: we shouldn't use this!
+ canvas_text = (SPCanvasText *) sp_canvastext_new(sp_desktop_tempgroup(desktop), desktop, Geom::Point(0,0), "");
sp_canvastext_set_text (canvas_text, default_value.c_str());
sp_canvastext_set_coords (canvas_text, 0, 0);
}