| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2007 Eric Seidel <eric@webkit.org> |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 3 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 4 * |
| 4 * This library is free software; you can redistribute it and/or | 5 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 6 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 7 * License as published by the Free Software Foundation; either |
| 7 * 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. |
| 8 * | 9 * |
| 9 * 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, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 12 * Library General Public License for more details. | 13 * Library General Public License for more details. |
| 13 * | 14 * |
| 14 * 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 |
| 15 * 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 |
| 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 17 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
| 17 * Boston, MA 02110-1301, USA. | 18 * Boston, MA 02110-1301, USA. |
| 18 */ | 19 */ |
| 19 | 20 |
| 20 #ifndef SVGPathByteStreamBuilder_h | 21 #ifndef SVGPathQuery_h |
| 21 #define SVGPathByteStreamBuilder_h | 22 #define SVGPathQuery_h |
| 22 | |
| 23 #include "core/svg/SVGPathConsumer.h" | |
| 24 | 23 |
| 25 namespace blink { | 24 namespace blink { |
| 26 | 25 |
| 26 class FloatPoint; |
| 27 class SVGPathByteStream; | 27 class SVGPathByteStream; |
| 28 | 28 |
| 29 class SVGPathByteStreamBuilder final : public SVGPathConsumer { | 29 class SVGPathQuery { |
| 30 public: | 30 public: |
| 31 SVGPathByteStreamBuilder(SVGPathByteStream&); | 31 explicit SVGPathQuery(const SVGPathByteStream&); |
| 32 |
| 33 float getTotalLength() const; |
| 34 FloatPoint getPointAtLength(float length) const; |
| 35 unsigned getPathSegIndexAtLength(float length) const; |
| 32 | 36 |
| 33 private: | 37 private: |
| 34 void incrementPathSegmentCount() override { } | 38 const SVGPathByteStream& m_pathByteStream; |
| 35 bool continueConsuming() override { return true; } | |
| 36 | |
| 37 void emitSegment(const PathSegmentData&) override; | |
| 38 | |
| 39 SVGPathByteStream& m_byteStream; | |
| 40 }; | 39 }; |
| 41 | 40 |
| 42 } // namespace blink | 41 } // namespace blink |
| 43 | 42 |
| 44 #endif // SVGPathByteStreamBuilder_h | 43 #endif // SVGPathQuery_h |
| OLD | NEW |