Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
skpaint_path_1d_path_effect.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(skpaint_path_1d_path_effect, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
7 SkPath path;
8 path.addOval(SkRect::MakeWH(16.0f, 6.0f));
9 paint.setPathEffect(
11 paint.setAntiAlias(true);
12 canvas->clear(SK_ColorWHITE);
13 canvas->drawCircle(128.0f, 128.0f, 122.0f, paint);
14}
15} // END FIDDLE
constexpr SkColor SK_ColorWHITE
Definition SkColor.h:122
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition aaclip.cpp:27
void clear(SkColor color)
Definition SkCanvas.h:1199
void drawCircle(SkScalar cx, SkScalar cy, SkScalar radius, const SkPaint &paint)
static sk_sp< SkPathEffect > Make(const SkPath &path, SkScalar advance, SkScalar phase, Style)
const Paint & paint
#define REG_FIDDLE(NAME, W, H, TEXT, I)
Definition examples.h:60
static constexpr SkRect MakeWH(float w, float h)
Definition SkRect.h:609