diff options
author | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
---|---|---|
committer | The Android Open Source Project <initial-contribution@android.com> | 2008-12-17 18:05:15 -0800 |
commit | 1cbdecfa9fc428ac2d8aca0fa91c9580b3d57353 (patch) | |
tree | 4457a7306ea5acb43fe05bfe0973b1f7faf97ba2 /WebCore/svg/SVGPointList.cpp | |
parent | 9364f22aed35e1a1e9d07c121510f80be3ab0502 (diff) | |
download | external_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.cpp | 20 |
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) |