summaryrefslogtreecommitdiffstats
path: root/src/live_effects/lpe-ruler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/live_effects/lpe-ruler.cpp')
-rw-r--r--src/live_effects/lpe-ruler.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/live_effects/lpe-ruler.cpp b/src/live_effects/lpe-ruler.cpp
index fefdad95a..788ab593a 100644
--- a/src/live_effects/lpe-ruler.cpp
+++ b/src/live_effects/lpe-ruler.cpp
@@ -81,9 +81,9 @@ LPERuler::ruler_mark(Geom::Point const &A, Geom::Point const &n, MarkType const
using namespace Geom;
double real_mark_length = mark_length;
- sp_convert_distance(&real_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ real_mark_length = Inkscape::Util::Quantity::convert(real_mark_length, unit.get_abbreviation(), "px");
double real_minor_mark_length = minor_mark_length;
- sp_convert_distance(&real_minor_mark_length, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ real_minor_mark_length = Inkscape::Util::Quantity::convert(real_minor_mark_length, unit.get_abbreviation(), "px");
n_major = real_mark_length * n;
n_minor = real_minor_mark_length * n;
@@ -133,10 +133,10 @@ LPERuler::doEffect_pwd2 (Geom::Piecewise<Geom::D2<Geom::SBasis> > const & pwd2_i
std::vector<double> s_cuts;
double real_mark_distance = mark_distance;
- sp_convert_distance(&real_mark_distance, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ real_mark_distance = Inkscape::Util::Quantity::convert(real_mark_distance, unit.get_abbreviation(), "px");
double real_offset = offset;
- sp_convert_distance(&real_offset, unit, &sp_unit_get_by_id(SP_UNIT_PX));
+ real_offset = Inkscape::Util::Quantity::convert(real_offset, unit.get_abbreviation(), "px");
for (double s = real_offset; s<totlength; s+=real_mark_distance){
s_cuts.push_back(s);
}