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

Go to the source code of this file.

Functions

 REG_FIDDLE (Matrix_mapRect_3, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Matrix_mapRect_3  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file Matrix_mapRect_3.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 SkRect rect{110, 50, 180, 100};
8 matrix.setRotate(50, 28, 28);
9 SkRect mapped = matrix.mapRect(rect);
11 paint.setAntiAlias(true);
13 canvas->drawRect(rect, paint);
14 canvas->drawRect(mapped, paint);
15 canvas->concat(matrix);
16 canvas->drawRect(rect, paint);
17}
18} // END FIDDLE
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawRect(const SkRect &rect, const SkPaint &paint)
Definition: SkCanvas.cpp:1673
void concat(const SkMatrix &matrix)
Definition: SkCanvas.cpp:1318
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
const Paint & paint
Definition: color_source.cc:38
unsigned useCenter Optional< SkMatrix > matrix
Definition: SkRecords.h:258
sk_sp< SkBlender > blender SkRect rect
Definition: SkRecords.h:350