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

Unified Diff: third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp

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, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathUtilities.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
diff --git a/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp b/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
index c7a26df7a65a41762984e28c7f2e84989a565c64..e29200792cc45342dc0fc5f3d16bdb8a55fd5f2a 100644
--- a/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
+++ b/third_party/WebKit/Source/core/svg/SVGPathUtilities.cpp
@@ -26,8 +26,6 @@
#include "core/svg/SVGPathParser.h"
#include "core/svg/SVGPathStringBuilder.h"
#include "core/svg/SVGPathStringSource.h"
-#include "core/svg/SVGPathTraversalStateBuilder.h"
-#include "platform/graphics/PathTraversalState.h"
namespace blink {
@@ -82,40 +80,4 @@ bool buildByteStreamFromString(const String& d, SVGPathByteStream& result)
return ok;
}
-unsigned getSVGPathSegAtLengthFromSVGPathByteStream(const SVGPathByteStream& stream, float length)
-{
- if (stream.isEmpty())
- return 0;
-
- SVGPathTraversalStateBuilder builder(PathTraversalState::TraversalSegmentAtLength, length);
- SVGPathByteStreamSource source(stream);
- SVGPathParser parser(&source, &builder);
- parser.parsePathDataFromSource(NormalizedParsing);
- return builder.pathSegmentIndex();
-}
-
-float getTotalLengthOfSVGPathByteStream(const SVGPathByteStream& stream)
-{
- if (stream.isEmpty())
- return 0;
-
- SVGPathTraversalStateBuilder builder(PathTraversalState::TraversalTotalLength);
- SVGPathByteStreamSource source(stream);
- SVGPathParser parser(&source, &builder);
- parser.parsePathDataFromSource(NormalizedParsing);
- return builder.totalLength();
-}
-
-FloatPoint getPointAtLengthOfSVGPathByteStream(const SVGPathByteStream& stream, float length)
-{
- if (stream.isEmpty())
- return FloatPoint();
-
- SVGPathTraversalStateBuilder builder(PathTraversalState::TraversalPointAtLength, length);
- SVGPathByteStreamSource source(stream);
- SVGPathParser parser(&source, &builder);
- parser.parsePathDataFromSource(NormalizedParsing);
- return builder.currentPoint();
-}
-
}
« no previous file with comments | « third_party/WebKit/Source/core/svg/SVGPathUtilities.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698