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

Go to the source code of this file.

Functions

 REG_FIDDLE (Region_translate_2, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( Region_translate_2  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file Region_translate_2.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 SkIRect rects[] = {{40, 20, 50, 30}, {70, 40, 80, 50}, { 60, 10, 70, 20}};
8 test.setRects(rects, std::size(rects));
11 paint.setColor(color);
12 canvas->drawRegion(test, paint);
13 SkRegion second;
14 test.translate(10, test.getBounds().fBottom, &second);
15 test.op(second, SkRegion::kXOR_Op);
16 test.translate(30, 0);
17 }
18}
19} // END FIDDLE
#define test(name)
constexpr SkColor SK_ColorMAGENTA
Definition: SkColor.h:147
constexpr SkColor SK_ColorBLUE
Definition: SkColor.h:135
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
constexpr SkColor SK_ColorGREEN
Definition: SkColor.h:131
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
@ kXOR_Op
target exclusive or with operand
Definition: SkRegion.h:370
const Paint & paint
Definition: color_source.cc:38
DlColor color
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive keep the shell running after the Dart script has completed enable serial On low power devices with low core running concurrent GC tasks on threads can cause them to contend with the UI thread which could potentially lead to jank This option turns off all concurrent GC activities domain network JSON encoded network policy per domain This overrides the DisallowInsecureConnections switch Embedder can specify whether to allow or disallow insecure connections at a domain level old gen heap size
Definition: switches.h:259
Definition: SkRect.h:32