| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> | 2 * Copyright (C) 2004, 2005, 2006, 2008 Nikolas Zimmermann <zimmermann@kde.org> |
| 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> | 3 * Copyright (C) 2004, 2005 Rob Buis <buis@kde.org> |
| 4 * | 4 * |
| 5 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 6 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 7 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 8 * version 2 of the License, or (at your option) any later version. | 8 * version 2 of the License, or (at your option) any later version. |
| 9 * | 9 * |
| 10 * This library is distributed in the hope that it will be useful, | 10 * This library is distributed in the hope that it will be useful, |
| 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 14 * | 14 * |
| 15 * You should have received a copy of the GNU Library General Public License | 15 * You should have received a copy of the GNU Library General Public License |
| 16 * along with this library; see the file COPYING.LIB. If not, write to | 16 * along with this library; see the file COPYING.LIB. If not, write to |
| 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 18 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 19 */ | 19 */ |
| 20 | 20 |
| 21 #include "config.h" | 21 #include "config.h" |
| 22 | 22 |
| 23 #if ENABLE(SVG) | |
| 24 #include "core/svg/SVGPointList.h" | 23 #include "core/svg/SVGPointList.h" |
| 25 | 24 |
| 26 #include "core/platform/graphics/FloatPoint.h" | 25 #include "core/platform/graphics/FloatPoint.h" |
| 27 #include <wtf/text/StringBuilder.h> | 26 #include <wtf/text/StringBuilder.h> |
| 28 #include <wtf/text/WTFString.h> | 27 #include <wtf/text/WTFString.h> |
| 29 | 28 |
| 30 namespace WebCore { | 29 namespace WebCore { |
| 31 | 30 |
| 32 String SVGPointList::valueAsString() const | 31 String SVGPointList::valueAsString() const |
| 33 { | 32 { |
| 34 StringBuilder builder; | 33 StringBuilder builder; |
| 35 | 34 |
| 36 unsigned size = this->size(); | 35 unsigned size = this->size(); |
| 37 for (unsigned i = 0; i < size; ++i) { | 36 for (unsigned i = 0; i < size; ++i) { |
| 38 if (i > 0) | 37 if (i > 0) |
| 39 builder.append(' '); // FIXME: Shouldn't we use commas to seperate? | 38 builder.append(' '); // FIXME: Shouldn't we use commas to seperate? |
| 40 | 39 |
| 41 const FloatPoint& point = at(i); | 40 const FloatPoint& point = at(i); |
| 42 builder.append(String::number(point.x()) + ' ' + String::number(point.y(
))); | 41 builder.append(String::number(point.x()) + ' ' + String::number(point.y(
))); |
| 43 } | 42 } |
| 44 | 43 |
| 45 return builder.toString(); | 44 return builder.toString(); |
| 46 } | 45 } |
| 47 | 46 |
| 48 } | 47 } |
| 49 | |
| 50 #endif // ENABLE(SVG) | |
| OLD | NEW |