Hal Canary | 6c8422c | 2020-01-10 15:22:09 -0500 | [diff] [blame] | 1 | // Copyright 2020 Google LLC. |
| 2 | // Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. |
| 3 | #include "tools/fiddle/examples.h" |
| 4 | REG_FIDDLE(skbug_237_drawImage_with_blur, 256, 256, false, 6) { |
| 5 | void draw(SkCanvas* canvas) { |
| 6 | SkPaint paint; |
| 7 | paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, 5.0f, false)); |
| 8 | canvas->clear(0xFF88FF88); |
| 9 | canvas->scale(4, 4); |
| 10 | auto subset = image->makeSubset({16, 16, 48, 48}); |
Mike Reed | b339d05 | 2021-01-28 11:20:41 -0500 | [diff] [blame] | 11 | canvas->drawImage(subset, 16, 16, SkSamplingOptions(), &paint); |
Hal Canary | 6c8422c | 2020-01-10 15:22:09 -0500 | [diff] [blame] | 12 | } |
| 13 | } // END FIDDLE |