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

Go to the source code of this file.

Functions

 REG_FIDDLE (Canvas_drawRegion, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Canvas_drawRegion  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file Canvas_drawRegion.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 region.op({10, 10, 50, 50}, SkRegion::kUnion_Op);
8 region.op({10, 50, 90, 90}, SkRegion::kUnion_Op);
10 paint.setAntiAlias(true);
12 paint.setStrokeWidth(20);
13 paint.setStrokeJoin(SkPaint::kRound_Join);
14 canvas->drawRegion(region, paint);
15}
16} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawRegion(const SkRegion &region, const SkPaint &paint)
Definition: SkCanvas.cpp:1685
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
@ kRound_Join
adds circle
Definition: SkPaint.h:360
@ 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