summaryrefslogtreecommitdiffstats
path: root/WebCore/svg/SVGPointList.cpp
diff options
context:
space:
mode:
authorThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
committerThe Android Open Source Project <initial-contribution@android.com>2008-12-17 18:05:15 -0800
commit1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch)
tree4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/svg/SVGPointList.cpp
parent9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff)
downloadexternal_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.zip
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.gz
external_webkit-1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353.tar.bz2
Code drop from //branches/cupcake/...@124589
Diffstat (limited to 'WebCore/svg/SVGPointList.cpp')
-rw-r--r--WebCore/svg/SVGPointList.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/WebCore/svg/SVGPointList.cpp b/WebCore/svg/SVGPointList.cpp
index 25160bb..c5a6dd2 100644
--- a/WebCore/svg/SVGPointList.cpp
+++ b/WebCore/svg/SVGPointList.cpp
@@ -23,8 +23,8 @@
#include "config.h"
#if ENABLE(SVG)
-
#include "SVGPointList.h"
+#include "PlatformString.h"
namespace WebCore {
@@ -37,6 +37,24 @@ SVGPointList::~SVGPointList()
{
}
+String SVGPointList::valueAsString() const
+{
+ String result;
+
+ ExceptionCode ec = 0;
+ for (unsigned int i = 0; i < numberOfItems(); ++i) {
+ if (i > 0)
+ result += " ";
+
+ FloatPoint point = getItem(i, ec);
+ ASSERT(ec == 0);
+
+ result += String::format("%.6lg %.6lg", point.x(), point.y());
+ }
+
+ return result;
+}
+
}
#endif // ENABLE(SVG)