diff options
author | 2013-02-20 12:51:37 +0000 | |
---|---|---|
committer | 2013-02-20 12:51:37 +0000 | |
commit | 5e0500fb5f17fe14db42fc3e0aad08e6b41ccc5f (patch) | |
tree | 44dc49df87ca6ee505c59bdb24ee5d43a02481dd /experimental/Intersection/SimplifyNew_Test.cpp | |
parent | 76bf70d38fd109a09ee44d074cfd392e1884afff (diff) |
shape ops work in progress
git-svn-id: http://skia.googlecode.com/svn/trunk@7788 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'experimental/Intersection/SimplifyNew_Test.cpp')
-rw-r--r-- | experimental/Intersection/SimplifyNew_Test.cpp | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/experimental/Intersection/SimplifyNew_Test.cpp b/experimental/Intersection/SimplifyNew_Test.cpp index 78b815ac89..39cf5a8dac 100644 --- a/experimental/Intersection/SimplifyNew_Test.cpp +++ b/experimental/Intersection/SimplifyNew_Test.cpp @@ -3845,12 +3845,68 @@ static void cubicOp20d() { testShapeOp(path, pathB, kDifference_Op); } -static void (*firstTest)() = cubicOp20d; +static void cubicOp21d() { + SkPath path, pathB; + path.setFillType(SkPath::kWinding_FillType); + path.moveTo(0,1); + path.cubicTo(0,1, 2,1, 6,5); + path.close(); + pathB.setFillType(SkPath::kWinding_FillType); + pathB.moveTo(1,2); + pathB.cubicTo(5,6, 1,0, 1,0); + pathB.close(); + testShapeOp(path, pathB, kDifference_Op); +} + +static void cubicOp22d() { + SkPath path, pathB; + path.setFillType(SkPath::kWinding_FillType); + path.moveTo(0,1); + path.cubicTo(2,3, 3,0, 2,1); + path.close(); + pathB.setFillType(SkPath::kWinding_FillType); + pathB.moveTo(0,3); + pathB.cubicTo(1,2, 1,0, 3,2); + pathB.close(); + testShapeOp(path, pathB, kDifference_Op); +} + +static void cubicOp23d() { + SkPath path, pathB; + path.setFillType(SkPath::kWinding_FillType); + path.moveTo(0,1); + path.cubicTo(1,2, 4,0, 2,1); + path.close(); + pathB.setFillType(SkPath::kWinding_FillType); + pathB.moveTo(0,4); + pathB.cubicTo(1,2, 1,0, 2,1); + pathB.close(); + testShapeOp(path, pathB, kDifference_Op); +} + +static void cubicOp24d() { + SkPath path, pathB; + path.setFillType(SkPath::kWinding_FillType); + path.moveTo(0,1); + path.cubicTo(1,2, 2,0, 3,2); + path.close(); + pathB.setFillType(SkPath::kWinding_FillType); + pathB.moveTo(0,2); + pathB.cubicTo(2,3, 1,0, 2,1); + pathB.close(); + testShapeOp(path, pathB, kDifference_Op); +} + +static void (*firstTest)() = 0; static struct { void (*fun)(); const char* str; } tests[] = { + TEST(cubicOp24d), + TEST(cubicOp23d), + TEST(cubicOp22d), + TEST(cubicOp21d), TEST(cubicOp20d), TEST(cubicOp19i), TEST(cubicOp18d), |