Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(186)

Side by Side Diff: third_party/WebKit/Source/core/svg/SVGPathQuery.h

Issue 1471943003: Introduce SVGPathQuery to hold SVG path query methods (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathParser.cpp ('k') | third_party/WebKit/Source/core/svg/SVGPathQuery.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698