summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3bb2cd0)
raw | patch | inline | side by side (parent: 3bb2cd0)
author | jaspervdg <jaspervdg@users.sourceforge.net> | |
Tue, 27 May 2008 07:25:44 +0000 (07:25 +0000) | ||
committer | jaspervdg <jaspervdg@users.sourceforge.net> | |
Tue, 27 May 2008 07:25:44 +0000 (07:25 +0000) |
src/svg/path-string.cpp | patch | blob | history |
index 44b474dd246162541d722850834c447d5db0789d..c1725db6ba3fb9e5f87bd4992e30afc5083cf018 100644 (file)
--- a/src/svg/path-string.cpp
+++ b/src/svg/path-string.cpp
#include "svg/path-string.h"
#include "svg/stringstream.h"
+#include "svg/svg.h"
#include "prefs-utils.h"
#include <algorithm>
void Inkscape::SVG::PathString::State::append(NR::Coord v, NR::Coord &rv) {
SVGOStringStream os;
- os << ' ' << v;
- str.append(os.str());
+ os << v;
+ str += ' ';
+ str += os.str();
double c;
- sscanf(os.str().c_str(), " %lf", &c);
+ sp_svg_number_read_d(os.str().c_str(), &c);
rv = c;
}
void Inkscape::SVG::PathString::State::append(NR::Point p, NR::Point &rp) {
- SVGOStringStream os;
- os << ' ' << p[NR::X] << ',' << p[NR::Y];
- str.append(os.str());
+ SVGOStringStream osx, osy;
+ osx << p[NR::X];
+ osy << p[NR::Y];
+ str += ' ';
+ str += osx.str();
+ str += ',';
+ str += osy.str();
double x, y;
- sscanf(os.str().c_str(), " %lf,%lf", &x, &y);
+ sp_svg_number_read_d(osx.str().c_str(), &x);
+ sp_svg_number_read_d(osy.str().c_str(), &y);
rp[NR::X] = x;
rp[NR::Y] = y;
}