| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2013 Google Inc. | 2 * Copyright 2013 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 "SkOpSegment.h" | 7 #include "SkOpSegment.h" |
| 8 #include "SkTArray.h" | 8 #include "SkTArray.h" |
| 9 #include "Test.h" | 9 #include "Test.h" |
| 10 | 10 |
| (...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 272 double tEnd = set[idx].tEnd; | 272 double tEnd = set[idx].tEnd; |
| 273 seg->addT(NULL, start, tStart); | 273 seg->addT(NULL, start, tStart); |
| 274 seg->addT(NULL, end, tEnd); | 274 seg->addT(NULL, end, tEnd); |
| 275 if (tStart != 0 && tEnd != 0) { | 275 if (tStart != 0 && tEnd != 0) { |
| 276 seg->addT(NULL, set[idx].ptData[0], 0); | 276 seg->addT(NULL, set[idx].ptData[0], 0); |
| 277 } | 277 } |
| 278 if (tStart != 1 && tEnd != 1) { | 278 if (tStart != 1 && tEnd != 1) { |
| 279 seg->addT(NULL, set[idx].ptData[set[idx].ptCount - 1], 1); | 279 seg->addT(NULL, set[idx].ptData[set[idx].ptCount - 1], 1); |
| 280 } | 280 } |
| 281 int tIndex = 0; | 281 int tIndex = 0; |
| 282 ts[0] = 0; |
| 283 ts[1] = 1; |
| 282 do { | 284 do { |
| 283 if (seg->t(tIndex) == set[idx].tStart) { | 285 if (seg->t(tIndex) == set[idx].tStart) { |
| 284 ts[0] = tIndex; | 286 ts[0] = tIndex; |
| 285 } | 287 } |
| 286 if (seg->t(tIndex) == set[idx].tEnd) { | 288 if (seg->t(tIndex) == set[idx].tEnd) { |
| 287 ts[1] = tIndex; | 289 ts[1] = tIndex; |
| 288 } | 290 } |
| 289 if (seg->t(tIndex) >= 1) { | 291 if (seg->t(tIndex) >= 1) { |
| 290 break; | 292 break; |
| 291 } | 293 } |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 438 angle, rAngle, diff, (int) (diff / FLT_EPSILON)); | 440 angle, rAngle, diff, (int) (diff / FLT_EPSILON)); |
| 439 | 441 |
| 440 } | 442 } |
| 441 } | 443 } |
| 442 #endif | 444 #endif |
| 443 | 445 |
| 444 #include "TestClassDef.h" | 446 #include "TestClassDef.h" |
| 445 DEFINE_TESTCLASS_SHORT(PathOpsAngleTest) | 447 DEFINE_TESTCLASS_SHORT(PathOpsAngleTest) |
| 446 | 448 |
| 447 // DEFINE_TESTCLASS_SHORT(PathOpsAngleFindSlop) | 449 // DEFINE_TESTCLASS_SHORT(PathOpsAngleFindSlop) |
| OLD | NEW |