aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PathOpsCubicLineIntersectionTest.cpp
diff options
context:
space:
mode:
authorGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-15 13:29:13 +0000
committerGravatar caryclark@google.com <caryclark@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-07-15 13:29:13 +0000
commitfa2aeee27af27f2934ee52a9732148f66481fb03 (patch)
tree55bd975ad23945da95bdbe6e4a57aa5688baee28 /tests/PathOpsCubicLineIntersectionTest.cpp
parentc2050e3a3ecfb8738b36e2add15c526e8e0f21fe (diff)
path ops near exact
Modify line intersections to first - match exact ends - compute intersections - match near ends where the exact ends are preferred, then near matches, then computed matches. This pulls matches towards existing end points when possible, and keeps intersection distances consistent with different line/line line/quad and line/cubic computations. BUG= Review URL: https://codereview.chromium.org/19183003 git-svn-id: http://skia.googlecode.com/svn/trunk@10073 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PathOpsCubicLineIntersectionTest.cpp')
-rw-r--r--tests/PathOpsCubicLineIntersectionTest.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tests/PathOpsCubicLineIntersectionTest.cpp b/tests/PathOpsCubicLineIntersectionTest.cpp
index 29c04ae7b8..245f8a6674 100644
--- a/tests/PathOpsCubicLineIntersectionTest.cpp
+++ b/tests/PathOpsCubicLineIntersectionTest.cpp
@@ -14,6 +14,10 @@ static struct lineCubic {
SkDCubic cubic;
SkDLine line;
} lineCubicTests[] = {
+#if 0
+ {{{{258, 122}, {260.761414, 122}, { 263, 124.238579}, {263, 127}}},
+ {{{259.82843, 125.17157}, {261.535522, 123.46447}}}},
+#endif
{{{{1006.6951293945312,291}, {1023.263671875,291}, {1033.8402099609375,304.43145751953125},
{1030.318359375,321}}},
{{{979.30487060546875,561}, {1036.695068359375,291}}}},
@@ -67,7 +71,7 @@ static void PathOpsCubicLineIntersectionTest(skiatest::Reporter* reporter) {
}
}
-static void PathOpsCubicLineIntersectionTestOne(skiatest::Reporter* reporter) {
+static void PathOpsCubicLineIntersectionOneOffTest(skiatest::Reporter* reporter) {
int iIndex = 0;
testOne(reporter, iIndex);
const SkDCubic& cubic = lineCubicTests[iIndex].cubic;
@@ -95,4 +99,4 @@ static void PathOpsCubicLineIntersectionTestOne(skiatest::Reporter* reporter) {
#include "TestClassDef.h"
DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionTest)
-DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionTestOne)
+DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionOneOffTest)