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

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: Const-qualify. 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
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 907f8d1e587cc76527a958692ddc7093ca5a02e9..3f60b490d74f5f57c31c275926616acd5b6af1aa 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 {
@@ -83,40 +81,4 @@ bool buildSVGPathByteStreamFromString(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();
-}
-
}

Powered by Google App Engine
This is Rietveld 408576698