Code

90d9ebff98a66069e13540a2f66a632d8b4a135b
[inkscape.git] / src / live_effects / parameter / vector.cpp
1 #define INKSCAPE_LIVEPATHEFFECT_PARAMETER_VECTOR_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/vector.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 VectorParam<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 VectorParam<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 :