Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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) {
6 SkPaint p;
7 p.setColor(SK_ColorRED);
8 p.setAntiAlias(true);
9 p.setStyle(SkPaint::kStroke_Style);
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)
static sk_sp< SkPathEffect > Make(const SkScalar intervals[], int count, SkScalar phase)
@ kStroke_Style
set to stroke geometry
Definition SkPaint.h:194
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60
float SkScalar
Definition extension.cpp:12