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

Go to the source code of this file.

Functions

 REG_FIDDLE (issue640176, 256, 256, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( issue640176  ,
256  ,
256  ,
false  ,
 
)

Definition at line 4 of file issue640176.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 p.setColor(SK_ColorRED);
8 p.setAntiAlias(true);
9 float startAngle = -0.5235985, endAngle = -2.439e-4, radius = 120;
10
11 canvas->translate(radius, radius);
13 path.moveTo(0, 0);
14 path.lineTo(radius * cos(startAngle), radius * sin(startAngle));
15 SkRect oval = {-radius, -radius, radius, radius};
16 path.arcTo(oval, startAngle * 180 / 3.14159265359,
17 (endAngle - startAngle) * 180 / 3.14159265359, false);
18 canvas->drawPath(path, p);
19
20 p.setStyle(SkPaint::kStroke_Style);
21 p.setColor(SK_ColorGREEN);
22 canvas->drawPath(path, p);
23}
24} // END FIDDLE
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 translate(SkScalar dx, SkScalar dy)
Definition: SkCanvas.cpp:1278
void drawPath(const SkPath &path, const SkPaint &paint)
Definition: SkCanvas.cpp:1747
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
Definition: SkPath.h:59
SkRect oval
Definition: SkRecords.h:249
SkScalar startAngle
Definition: SkRecords.h:250
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot The VM snapshot data that will be memory mapped as read only SnapshotAssetPath must be present isolate snapshot The isolate snapshot data that will be memory mapped as read only SnapshotAssetPath must be present cache dir path
Definition: switches.h:57