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

Go to the source code of this file.

Functions

 REG_FIDDLE (Canvas_clipRect_2, 280, 192, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Canvas_clipRect_2  ,
280  ,
192  ,
false  ,
 
)

Definition at line 4 of file Canvas_clipRect_2.cpp.

4 {
5void draw(SkCanvas* canvas) {
8 canvas->save();
9 canvas->clipRect(SkRect::MakeWH(90, 120), op, false);
10 canvas->drawCircle(100, 100, 60, paint);
11 canvas->restore();
12 canvas->translate(80, 0);
13 }
14}
15} // END FIDDLE
SkClipOp
Definition: SkClipOp.h:13
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void clipRect(const SkRect &rect, SkClipOp op, bool doAntiAlias)
Definition: SkCanvas.cpp:1361
void restore()
Definition: SkCanvas.cpp:461
void translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
int save()
Definition: SkCanvas.cpp:447
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
Definition: SkCanvas.cpp:2707
const Paint & paint
Definition: color_source.cc:38
static constexpr SkRect MakeWH(float w, float h)
Definition: SkRect.h:609