Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Macros | Functions | Variables
PathEffectsSlide.cpp File Reference
#include "include/core/SkCanvas.h"
#include "include/core/SkColorPriv.h"
#include "include/core/SkPath.h"
#include "include/core/SkPathEffect.h"
#include "include/core/SkPathMeasure.h"
#include "include/core/SkRegion.h"
#include "include/core/SkShader.h"
#include "include/effects/Sk1DPathEffect.h"
#include "include/effects/SkCornerPathEffect.h"
#include "include/effects/SkGradientShader.h"
#include "src/base/SkRandom.h"
#include "src/base/SkUTF.h"
#include "tools/timer/TimeUtils.h"
#include "tools/viewer/Slide.h"
#include "include/core/SkColorFilter.h"

Go to the source code of this file.

Classes

class  PathEffectSlide
 

Macros

#define CORNER_RADIUS   12
 

Functions

static sk_sp< SkPathEffectmake_pe (int flags, SkScalar phase)
 
static sk_sp< SkPathEffectmake_warp_pe (SkScalar phase)
 

Variables

static const int gXY []
 

Macro Definition Documentation

◆ CORNER_RADIUS

#define CORNER_RADIUS   12

Definition at line 23 of file PathEffectsSlide.cpp.

Function Documentation

◆ make_pe()

static sk_sp< SkPathEffect > make_pe ( int  flags,
SkScalar  phase 
)
static

Definition at line 29 of file PathEffectsSlide.cpp.

29 {
30 if (flags == 1) {
32 }
33
35 path.moveTo(SkIntToScalar(gXY[0]), SkIntToScalar(gXY[1]));
36 for (unsigned i = 2; i < std::size(gXY); i += 2)
37 path.lineTo(SkIntToScalar(gXY[i]), SkIntToScalar(gXY[i+1]));
38 path.close();
39 path.offset(SkIntToScalar(-6), 0);
40
42
43 if (flags == 2)
44 return outer;
45
47
48 return SkPathEffect::MakeCompose(outer, inner);
49}
static const int gXY[]
#define CORNER_RADIUS
#define SkIntToScalar(x)
Definition SkScalar.h:57
static sk_sp< SkPathEffect > Make(SkScalar radius)
static sk_sp< SkPathEffect > Make(const SkPath &path, SkScalar advance, SkScalar phase, Style)
static sk_sp< SkPathEffect > MakeCompose(sk_sp< SkPathEffect > outer, sk_sp< SkPathEffect > inner)
FlutterSemanticsFlag flags
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

◆ make_warp_pe()

static sk_sp< SkPathEffect > make_warp_pe ( SkScalar  phase)
static

Definition at line 51 of file PathEffectsSlide.cpp.

51 {
53 path.moveTo(SkIntToScalar(gXY[0]), SkIntToScalar(gXY[1]));
54 for (unsigned i = 2; i < std::size(gXY); i += 2) {
55 path.lineTo(SkIntToScalar(gXY[i]), SkIntToScalar(gXY[i+1]));
56 }
57 path.close();
58 path.offset(SkIntToScalar(-6), 0);
59
60 auto outer = SkPath1DPathEffect::Make(
61 path, 12, phase, SkPath1DPathEffect::kMorph_Style);
63
64 return SkPathEffect::MakeCompose(outer, inner);
65}

Variable Documentation

◆ gXY

const int gXY[]
static
Initial value:
= {
4, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4
}

Definition at line 25 of file PathEffectsSlide.cpp.

25 {
26 4, 0, 0, -4, 8, -4, 12, 0, 8, 4, 0, 4
27};