2 * Copyright 2013 Google Inc.
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
7 #include "PathOpsExtendedTest.h"
9 DEF_TEST(PathOpsInverse, reporter) {
11 for (int op = kDifference_PathOp; op <= kReverseDifference_PathOp; ++op) {
12 for (int oneFill = SkPath::kWinding_FillType; oneFill <= SkPath::kInverseEvenOdd_FillType;
14 for (int oneDir = SkPath::kCW_Direction; oneDir != SkPath::kCCW_Direction; ++oneDir) {
16 one.setFillType((SkPath::FillType) oneFill);
17 one.addRect(0, 0, 6, 6, (SkPath::Direction) oneDir);
18 for (int twoFill = SkPath::kWinding_FillType;
19 twoFill <= SkPath::kInverseEvenOdd_FillType; ++twoFill) {
20 for (int twoDir = SkPath::kCW_Direction; twoDir != SkPath::kCCW_Direction;
23 two.setFillType((SkPath::FillType) twoFill);
24 two.addRect(3, 3, 9, 9, (SkPath::Direction) twoDir);
25 testPathOp(reporter, one, two, (SkPathOp) op, "inverseTest");