Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
skbug_237_drawImageRect.cpp
Go to the documentation of this file.
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.
4REG_FIDDLE(skbug_237_drawImageRect, 256, 256, false, 6) {
5void draw(SkCanvas* canvas) {
7 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, 20.0f, false));
8 canvas->clear(0xFF88FF88);
9 canvas->drawImageRect(image, SkRect{16, 16, 48, 48}, {64, 64, 192, 192}, SkSamplingOptions(),
11}
12} // END FIDDLE
@ kNormal_SkBlurStyle
fuzzy inside and outside
Definition SkBlurTypes.h:12
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
@ kFast_SrcRectConstraint
sample outside bounds; faster
Definition SkCanvas.h:1543
void clear(SkColor color)
Definition SkCanvas.h:1199
void drawImageRect(const SkImage *, const SkRect &src, const SkRect &dst, const SkSamplingOptions &, const SkPaint *, SrcRectConstraint)
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
const Paint & paint
sk_sp< SkImage > image
Definition examples.cpp:29
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60