Flutter Engine
The Flutter Engine
fluttershadow.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(fluttershadow, 256, 256, false, 0) {
5void draw(SkCanvas* canvas) {
7 p.setAntiAlias(true);
9 path.moveTo(50.0, 50.0);
10
11 // Comment the next 4 lines, and the shadow will draw.
12 path.lineTo(60.0, 50.0);
13 path.lineTo(60.0, 60.0);
14 path.lineTo(70.0, 60.0);
15 path.lineTo(70.0, 50.0);
16
17 path.lineTo(150.0, 50.0);
18 path.lineTo(150.0, 150.0);
19 path.lineTo(50.0, 150.0);
20 path.close();
22 canvas->drawPath(path, p);
23}
24} // END FIDDLE
@ kNormal_SkBlurStyle
fuzzy inside and outside
Definition: SkBlurTypes.h:12
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
Definition: aaclip.cpp:27
void drawPath(const SkPath &path, const SkPaint &paint)
Definition: SkCanvas.cpp:1747
static sk_sp< SkMaskFilter > MakeBlur(SkBlurStyle style, SkScalar sigma, bool respectCTM=true)
Definition: SkPath.h:59
REG_FIDDLE(fluttershadow, 256, 256, false, 0)
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