Flutter Engine
The Flutter Engine
Functions
draw_image_nine_blur_mask.cpp File Reference
#include "tools/fiddle/examples.h"

Go to the source code of this file.

Functions

 REG_FIDDLE (draw_image_nine_blur_mask, 256, 256, false, 6)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( draw_image_nine_blur_mask  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file draw_image_nine_blur_mask.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 paint.setMaskFilter(SkMaskFilter::MakeBlur(kNormal_SkBlurStyle, 6, false));
8 canvas->clear(0xFFFF4444);
9 canvas->drawImageNine(image.get(), {16, 16, 48, 48}, {8, 8, 248, 248},
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
void drawImageNine(const SkImage *image, const SkIRect &center, const SkRect &dst, SkFilterMode filter, const SkPaint *paint=nullptr)
Definition: SkCanvas.cpp:1769
void clear(SkColor color)
Definition: SkCanvas.h:1199
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
T * get() const
Definition: SkRefCnt.h:303
const Paint & paint
Definition: color_source.cc:38
sk_sp< const SkImage > image
Definition: SkRecords.h:269