From d0471e4de5ff9d31434c15b8036ce828041a238c Mon Sep 17 00:00:00 2001 From: Maximilian Albert Date: Wed, 18 Jul 2007 02:23:47 +0000 Subject: Use Inkscape's own code to write coordinates to svg (much nicer fix than commit #15449) (bzr r3265) --- src/box3d.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/box3d.cpp') diff --git a/src/box3d.cpp b/src/box3d.cpp index 1b467b178..dec5e9d17 100644 --- a/src/box3d.cpp +++ b/src/box3d.cpp @@ -17,6 +17,7 @@ #include #include "attributes.h" +#include "svg/stringstream.h" #include "box3d.h" static void sp_3dbox_class_init(SP3DBoxClass *klass); @@ -422,11 +423,9 @@ static gchar * sp_3dbox_get_corner_coords_string (SP3DBox *box, guint id) { id = id % 8; - gchar str1[G_ASCII_DTOSTR_BUF_SIZE]; - gchar str2[G_ASCII_DTOSTR_BUF_SIZE]; - g_ascii_dtostr (str2, sizeof (str2), box->corners[id][NR::X]); - return g_strjoin (",", g_ascii_dtostr (str1, sizeof (str1), box->corners[id][NR::X]), - g_ascii_dtostr (str2, sizeof (str2), box->corners[id][NR::Y]), NULL); + Inkscape::SVGOStringStream os; + os << box->corners[id][NR::X] << "," << box->corners[id][NR::Y]; + return g_strdup(os.str().c_str()); } static std::pair -- cgit v1.2.3