1 #define INKSCAPE_LIVEPATHEFFECT_PARAMETER_ARRAY_CPP
3 /*
4 * Copyright (C) Johan Engelen 2008 <j.b.c.engelen@utwente.nl>
5 *
6 * Released under GNU GPL, read the file 'COPYING' for more information
7 */
9 #include "live_effects/parameter/array.h"
11 #include "svg/svg.h"
12 #include "svg/stringstream.h"
14 #include <2geom/coord.h>
16 namespace Inkscape {
18 namespace LivePathEffect {
20 template <>
21 double
22 ArrayParam<double>::readsvg(const gchar * str)
23 {
24 double newx = Geom::infinity();
25 sp_svg_number_read_d(str, &newx);
26 return newx;
27 }
29 template <>
30 float
31 ArrayParam<float>::readsvg(const gchar * str)
32 {
33 float newx = Geom::infinity();
34 sp_svg_number_read_f(str, &newx);
35 return newx;
36 }
38 } /* namespace LivePathEffect */
40 } /* namespace Inkscape */
42 /*
43 Local Variables:
44 mode:c++
45 c-file-style:"stroustrup"
46 c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
47 indent-tabs-mode:nil
48 fill-column:99
49 End:
50 */
51 // vim: filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4 :