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

Go to the source code of this file.

Functions

 REG_FIDDLE (Image_Filter_Methods, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Image_Filter_Methods  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file Image_Filter_Methods.cpp.

4 {
6
7void draw(SkCanvas* canvas) {
10 paint.setStrokeWidth(2);
12 region.op({10, 10, 50, 50}, SkRegion::kUnion_Op);
13 region.op({10, 50, 90, 90}, SkRegion::kUnion_Op);
14 paint.setImageFilter(SkImageFilters::Blur(5.0f, 5.0f, nullptr));
15 canvas->drawRegion(region, paint);
16 paint.setImageFilter(nullptr);
18 canvas->translate(100, 100);
19 canvas->drawRegion(region, paint);
20}
21} // 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 translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
void drawRegion(const SkRegion &region, const SkPaint &paint)
Definition: SkCanvas.cpp:1685
static sk_sp< SkImageFilter > Blur(SkScalar sigmaX, SkScalar sigmaY, SkTileMode tileMode, sk_sp< SkImageFilter > input, const CropRect &cropRect={})
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
@ kUnion_Op
target unioned with operand
Definition: SkRegion.h:369
bool op(const SkIRect &rect, Op op)
Definition: SkRegion.h:384
const Paint & paint
Definition: color_source.cc:38
ClipOpAndAA opAA SkRegion region
Definition: SkRecords.h:238