blob: 929851e75b9c3163fb66c62018f93de0adc32634 [file] [log] [blame]
caryclark@google.com7dfbb072013-04-22 14:37:05 +00001/*
2 * Copyright 2013 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7#include "PathOpsExtendedTest.h"
8
tfarina@chromium.org78e7b4e2014-01-02 21:45:03 +00009DEF_TEST(PathOpsInverse, reporter) {
caryclark@google.com7dfbb072013-04-22 14:37:05 +000010 SkPath one, two;
caryclark54359292015-03-26 07:52:43 -070011 for (int op = kDifference_SkPathOp; op <= kReverseDifference_SkPathOp; ++op) {
caryclark@google.com7dfbb072013-04-22 14:37:05 +000012 for (int oneFill = SkPath::kWinding_FillType; oneFill <= SkPath::kInverseEvenOdd_FillType;
13 ++oneFill) {
14 for (int oneDir = SkPath::kCW_Direction; oneDir != SkPath::kCCW_Direction; ++oneDir) {
15 one.reset();
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;
21 ++twoDir) {
22 two.reset();
23 two.setFillType((SkPath::FillType) twoFill);
24 two.addRect(3, 3, 9, 9, (SkPath::Direction) twoDir);
commit-bot@chromium.org4431e772014-04-14 17:08:59 +000025 testPathOp(reporter, one, two, (SkPathOp) op, "inverseTest");
caryclark@google.com7dfbb072013-04-22 14:37:05 +000026 }
27 }
28 }
29 }
30 }
31}