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

Go to the source code of this file.

Functions

 REG_FIDDLE (IPoint_subtract_operator, 256, 64, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( IPoint_subtract_operator  ,
256  ,
64  ,
false  ,
 
)

Definition at line 4 of file IPoint_subtract_operator.cpp.

4 {
5void draw(SkCanvas* canvas) {
6 auto draw_lines = [=](const SkIPoint pts[], size_t count, SkPaint& paint) -> void {
7 for (size_t i = 0; i < count - 1; ++i) {
8 SkPoint p0, p1;
9 p0.iset(pts[i]);
10 p1.iset(pts[i + 1]);
11 canvas->drawLine(p0, p1, paint);
12 }
13 };
14 SkIPoint points[] = { { 3, 1 }, { 4, 2 }, { 5, 1 }, { 7, 3 } };
16 paint.setAntiAlias(true);
18 canvas->scale(30, 15);
19 draw_lines(points, std::size(points), paint);
20 points[1] += points[0] - points[3];
21 points[2] -= points[1] - points[0];
22 paint.setColor(SK_ColorRED);
23 draw_lines(points, std::size(points), paint);
24}
25} // END FIDDLE
int count
Definition: FontMgrTest.cpp:50
static const int points[]
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawLine(SkScalar x0, SkScalar y0, SkScalar x1, SkScalar y1, const SkPaint &paint)
Definition: SkCanvas.cpp:2700
void scale(SkScalar sx, SkScalar sy)
Definition: SkCanvas.cpp:1289
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
const Paint & paint
Definition: color_source.cc:38
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
void iset(int32_t x, int32_t y)
Definition: SkPoint_impl.h:214