Flutter Engine
The Flutter Engine
maddash.cpp
Go to the documentation of this file.
1// Copyright 2020 Google LLC.
2// Use of this source code is governed by a BSD-style license that can be found in the LICENSE file.
4REG_FIDDLE(maddash, 400, 200, false, 0) {
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
REG_FIDDLE(maddash, 400, 200, false, 0)
Definition: maddash.cpp:4