blob: 3d2e5f0e727683639a2c11e1ba734706eead215f [file] [log] [blame]
Hal Canary87515122019-03-15 14:22:51 -04001// Copyright 2019 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
Mike Kleinc0bd9f92019-04-23 12:05:21 -05003#include "tools/fiddle/examples.h"
Hal Canary87515122019-03-15 14:22:51 -04004// HASH=1453856a9d0c73e8192bf298c4143563
Hal Canarya7181e7c2019-03-18 16:06:34 -04005REG_FIDDLE(Path_IsInverseFillType, 256, 256, true, 0) {
Mike Reed7d34dc72019-11-26 12:17:17 -05006#define nameValue(fill) { SkPathFillType::fill, #fill }
Hal Canary87515122019-03-15 14:22:51 -04007
8void draw(SkCanvas* canvas) {
9 struct {
Mike Reed7d34dc72019-11-26 12:17:17 -050010 SkPathFillType fill;
Hal Canary87515122019-03-15 14:22:51 -040011 const char* name;
12 } fills[] = {
Mike Reed7d34dc72019-11-26 12:17:17 -050013 nameValue(kWinding),
14 nameValue(kEvenOdd),
15 nameValue(kInverseWinding),
16 nameValue(kInverseEvenOdd),
Hal Canary87515122019-03-15 14:22:51 -040017 };
18 for (auto fill: fills ) {
Mike Reed7d34dc72019-11-26 12:17:17 -050019 SkDebugf("IsInverseFillType(%s) == %s\n", fill.name, SkPathFillType_IsInverse(fill.fill) ?
Hal Canary87515122019-03-15 14:22:51 -040020 "true" : "false");
21 }
22}
23} // END FIDDLE