| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. | 2 * Copyright (C) Research In Motion Limited 2010. All rights reserved. |
| 3 * | 3 * |
| 4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
| 5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
| 6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
| 7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
| 8 * | 8 * |
| 9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
| 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 #include "core/svg/SVGPathByteStream.h" | 23 #include "core/svg/SVGPathByteStream.h" |
| 24 #include "core/svg/SVGPathSource.h" | 24 #include "core/svg/SVGPathSource.h" |
| 25 #include "platform/geometry/FloatPoint.h" | 25 #include "platform/geometry/FloatPoint.h" |
| 26 #include "wtf/PassOwnPtr.h" | 26 #include "wtf/PassOwnPtr.h" |
| 27 | 27 |
| 28 namespace blink { | 28 namespace blink { |
| 29 | 29 |
| 30 class SVGPathByteStreamSource final : public SVGPathSource { | 30 class SVGPathByteStreamSource final : public SVGPathSource { |
| 31 public: | 31 public: |
| 32 explicit SVGPathByteStreamSource(const SVGPathByteStream*); | 32 explicit SVGPathByteStreamSource(const SVGPathByteStream& stream) |
| 33 : m_streamCurrent(stream.begin()) |
| 34 , m_streamEnd(stream.end()) |
| 35 { |
| 36 } |
| 33 | 37 |
| 34 private: | 38 private: |
| 35 virtual bool hasMoreData() const override; | 39 virtual bool hasMoreData() const override; |
| 36 virtual bool moveToNextToken() override { return true; } | 40 virtual bool moveToNextToken() override { return true; } |
| 37 virtual bool parseSVGSegmentType(SVGPathSegType&) override; | 41 virtual bool parseSVGSegmentType(SVGPathSegType&) override; |
| 38 virtual SVGPathSegType nextCommand(SVGPathSegType) override; | 42 virtual SVGPathSegType nextCommand(SVGPathSegType) override; |
| 39 | 43 |
| 40 virtual bool parseMoveToSegment(FloatPoint&) override; | 44 virtual bool parseMoveToSegment(FloatPoint&) override; |
| 41 virtual bool parseLineToSegment(FloatPoint&) override; | 45 virtual bool parseLineToSegment(FloatPoint&) override; |
| 42 virtual bool parseLineToHorizontalSegment(float&) override; | 46 virtual bool parseLineToHorizontalSegment(float&) override; |
| (...skipping 28 matching lines...) Expand all Loading... |
| 71 return FloatPoint(x, y); | 75 return FloatPoint(x, y); |
| 72 } | 76 } |
| 73 | 77 |
| 74 SVGPathByteStream::DataIterator m_streamCurrent; | 78 SVGPathByteStream::DataIterator m_streamCurrent; |
| 75 SVGPathByteStream::DataIterator m_streamEnd; | 79 SVGPathByteStream::DataIterator m_streamEnd; |
| 76 }; | 80 }; |
| 77 | 81 |
| 78 } // namespace blink | 82 } // namespace blink |
| 79 | 83 |
| 80 #endif // SVGPathByteStreamSource_h | 84 #endif // SVGPathByteStreamSource_h |
| OLD | NEW |