Stephen White | 0c72ed3 | 2019-06-13 13:13:13 -0400 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2019 Google LLC |
| 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 | |
| 8 | #include "gm/gm.h" |
| 9 | #include "include/core/SkCanvas.h" |
| 10 | #include "include/core/SkPaint.h" |
Mike Reed | e9d783c | 2020-08-17 14:14:13 -0400 | [diff] [blame] | 11 | #include "include/core/SkPathBuilder.h" |
Stephen White | 0c72ed3 | 2019-06-13 13:13:13 -0400 | [diff] [blame] | 12 | |
| 13 | DEF_SIMPLE_GM(crbug_908646, canvas, 300, 300) { |
| 14 | SkPaint paint; |
| 15 | paint.setAntiAlias(true); |
Mike Reed | e9d783c | 2020-08-17 14:14:13 -0400 | [diff] [blame] | 16 | SkPathBuilder path; |
Mike Reed | 7d34dc7 | 2019-11-26 12:17:17 -0500 | [diff] [blame] | 17 | path.setFillType(SkPathFillType::kEvenOdd); |
Stephen White | 0c72ed3 | 2019-06-13 13:13:13 -0400 | [diff] [blame] | 18 | path.moveTo(50, 50); |
| 19 | path.lineTo(50, 300); |
| 20 | path.lineTo(250, 300); |
| 21 | path.lineTo(250, 50); |
| 22 | path.moveTo(200, 100); |
| 23 | path.lineTo(100, 100); |
| 24 | path.lineTo(150, 200); |
| 25 | path.moveTo(100, 250); |
| 26 | path.lineTo(150, 150); |
| 27 | path.lineTo(200, 250); |
Mike Reed | e9d783c | 2020-08-17 14:14:13 -0400 | [diff] [blame] | 28 | canvas->drawPath(path.detach(), paint); |
Stephen White | 0c72ed3 | 2019-06-13 13:13:13 -0400 | [diff] [blame] | 29 | } |