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

Side by Side Diff: tests/PathOpsCubicLineIntersectionTest.cpp

Issue 23542056: path ops work in progress (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: verbose + mutex around file number access Created 7 years, 2 months 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 | Annotate | Revision Log
« no previous file with comments | « tests/PathOpsCubicIntersectionTestData.cpp ('k') | tests/PathOpsCubicQuadIntersectionTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 #include "PathOpsTestCommon.h" 7 #include "PathOpsTestCommon.h"
8 #include "SkIntersections.h" 8 #include "SkIntersections.h"
9 #include "SkPathOpsCubic.h" 9 #include "SkPathOpsCubic.h"
10 #include "SkPathOpsLine.h" 10 #include "SkPathOpsLine.h"
11 #include "SkReduceOrder.h" 11 #include "SkReduceOrder.h"
12 #include "Test.h" 12 #include "Test.h"
13 13
14 static struct lineCubic { 14 static struct lineCubic {
15 SkDCubic cubic; 15 SkDCubic cubic;
16 SkDLine line; 16 SkDLine line;
17 } lineCubicTests[] = { 17 } lineCubicTests[] = {
18 {{{{0,1}, {1,6}, {4,1}, {4,3}}},
19 {{{6,1}, {1,4}}}},
20
21 {{{{0,1}, {2,6}, {4,1}, {5,4}}},
22 {{{6,2}, {1,4}}}},
23
18 {{{{0,4}, {3,4}, {6,2}, {5,2}}}, 24 {{{{0,4}, {3,4}, {6,2}, {5,2}}},
19 {{{4,3}, {2,6}}}}, 25 {{{4,3}, {2,6}}}},
20 #if 0 26 #if 0
21 {{{{258, 122}, {260.761414, 122}, { 263, 124.238579}, {263, 127}}}, 27 {{{{258, 122}, {260.761414, 122}, { 263, 124.238579}, {263, 127}}},
22 {{{259.82843, 125.17157}, {261.535522, 123.46447}}}}, 28 {{{259.82843, 125.17157}, {261.535522, 123.46447}}}},
23 #endif 29 #endif
24 {{{{1006.6951293945312,291}, {1023.263671875,291}, {1033.8402099609375,304.4 3145751953125}, 30 {{{{1006.6951293945312,291}, {1023.263671875,291}, {1033.8402099609375,304.4 3145751953125},
25 {1030.318359375,321}}}, 31 {1030.318359375,321}}},
26 {{{979.30487060546875,561}, {1036.695068359375,291}}}}, 32 {{{979.30487060546875,561}, {1036.695068359375,291}}}},
27 {{{{259.30487060546875,561}, {242.73631286621094,561}, {232.15980529785156,5 47.56854248046875}, 33 {{{{259.30487060546875,561}, {242.73631286621094,561}, {232.15980529785156,5 47.56854248046875},
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
98 SkDebugf("{{%1.9g,%1.9g}, {%1.9g,%1.9g}},\n", i.pt(0).fX, i.pt(0).fY, nextL. fX, nextL.fY); 104 SkDebugf("{{%1.9g,%1.9g}, {%1.9g,%1.9g}},\n", i.pt(0).fX, i.pt(0).fY, nextL. fX, nextL.fY);
99 SkDebugf("prevD=%1.9g dist=%1.9g nextD=%1.9g\n", prev.distance(nextL), 105 SkDebugf("prevD=%1.9g dist=%1.9g nextD=%1.9g\n", prev.distance(nextL),
100 sect.distance(i.pt(0)), cubic[3].distance(prevL)); 106 sect.distance(i.pt(0)), cubic[3].distance(prevL));
101 #endif 107 #endif
102 } 108 }
103 109
104 #include "TestClassDef.h" 110 #include "TestClassDef.h"
105 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionTest) 111 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionTest)
106 112
107 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionOneOffTest) 113 DEFINE_TESTCLASS_SHORT(PathOpsCubicLineIntersectionOneOffTest)
OLDNEW
« no previous file with comments | « tests/PathOpsCubicIntersectionTestData.cpp ('k') | tests/PathOpsCubicQuadIntersectionTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698