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(draw_image_nine_blur_mask, 256, 256, false, 6) { |
| 5 | void draw(SkCanvas* canvas) { |
| 6 | SkPaint paint; |
| 7 | paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, 6, false)); |
| 8 | canvas->clear(0xFFFF4444); |
Mike Reed | 9911630 | 2021-01-25 11:37:10 -0500 | [diff] [blame] | 9 | canvas->drawImageNine(image.get(), {16, 16, 48, 48}, {8, 8, 248, 248}, |
| 10 | SkFilterMode::kNearest, &paint); |
Hal Canary | 6c8422c | 2020-01-10 15:22:09 -0500 | [diff] [blame] | 11 | } |
| 12 | } // END FIDDLE |