diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-30 13:37:48 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2014-04-30 13:37:48 +0000 |
commit | 91fc81c972c5ac4090f106d3b3fd9b26a3235ce1 (patch) | |
tree | 977d8c67df4ec1096a30bc08ddc09763342d4cc5 /tests/PathOpsOpTest.cpp | |
parent | a90c6803865766d28e92091f56f718f5e41fe80f (diff) |
fix cubic/line intersection; add skp tests
BUG=skia:2488
TBR=reed
Author: caryclark@google.com
Review URL: https://codereview.chromium.org/252243003
git-svn-id: http://skia.googlecode.com/svn/trunk@14458 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'tests/PathOpsOpTest.cpp')
-rw-r--r-- | tests/PathOpsOpTest.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/tests/PathOpsOpTest.cpp b/tests/PathOpsOpTest.cpp index 7a1cbab5e3..86baea423c 100644 --- a/tests/PathOpsOpTest.cpp +++ b/tests/PathOpsOpTest.cpp @@ -3310,10 +3310,30 @@ static void quadOp10i(skiatest::Reporter* reporter, const char* filename) { testPathOp(reporter, path, pathB, kIntersect_PathOp, filename); } +static void kari1(skiatest::Reporter* reporter, const char* filename) { + SkPath path1; + path1.moveTo(39.9375, -5.8359375); + path1.lineTo(40.625, -5.7890625); + path1.lineTo(37.7109375, 1.3515625); + path1.lineTo(37.203125, 0.9609375); + path1.close(); + + SkPath path2; + path2.moveTo(37.52734375f, -1.44140625f); + path2.cubicTo(37.8736991882324f, -1.69921875f, 38.1640625f, -2.140625f, 38.3984375f, -2.765625f); + path2.lineTo(38.640625f, -2.609375f); + path2.cubicTo(38.53125f, -1.89583337306976f, 38.0664443969727f, -0.154893040657043f, 38.0664443969727f, -0.154893040657043f); + path2.cubicTo(38.0664443969727f, -0.154893040657043f, 37.1809883117676f, -1.18359375f, 37.52734375, -1.44140625f); + path2.close(); + + testPathOp(reporter, path1, path2, kDifference_PathOp, filename); +} + static void (*firstTest)(skiatest::Reporter* , const char* filename) = 0; static void (*stopTest)(skiatest::Reporter* , const char* filename) = 0; static struct TestDesc tests[] = { + TEST(kari1), TEST(quadOp10i), #if 0 // FIXME: serpentine curve is ordered the wrong way TEST(cubicOp114), |