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

Go to the source code of this file.

Functions

 REG_FIDDLE (maddash, 400, 200, false, 0)
 

Function Documentation

◆ REG_FIDDLE()

REG_FIDDLE ( maddash  ,
400  ,
200  ,
false  ,
 
)

Definition at line 4 of file maddash.cpp.

4 {
5void draw(SkCanvas* canvas) {
7 p.setColor(SK_ColorRED);
8 p.setAntiAlias(true);
10 p.setStrokeWidth(380);
11
12 SkScalar intvls[] = {2.5, 10000};
13 p.setPathEffect(SkDashPathEffect::Make(intvls, 2, 0));
14
15 canvas->drawCircle(0, 100, 200, p);
16}
17} // END FIDDLE
constexpr SkColor SK_ColorRED
Definition: SkColor.h:126
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
Definition: SkCanvas.cpp:2707
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
@ kStroke_Style
set to stroke geometry
Definition: SkPaint.h:194
float SkScalar
Definition: extension.cpp:12