Go to the source code of this file.
|
static sk_sp< SkShader > | MakeLinear (const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale) |
| Ignores scale.
|
|
static sk_sp< SkShader > | MakeRadial (const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale) |
|
static sk_sp< SkShader > | MakeSweep (const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale) |
| Ignores scale.
|
|
static sk_sp< SkShader > | MakeConical (const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale) |
| Ignores scale.
|
|
static sk_sp< SkShader > | MakeConicalZeroRad (const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale) |
| Ignores scale.
|
|
static sk_sp< SkShader > | MakeConicalOutside (const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale) |
| Ignores scale.
|
|
static sk_sp< SkShader > | MakeConicalOutsideZeroRad (const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale) |
| Ignores scale.
|
|
static const char * | geomtypename (GeomType gt) |
|
◆ GradMaker
◆ GeomType
◆ GradType
Enumerator |
---|
kLinear_GradType | |
kRadial_GradType | |
kSweep_GradType | |
kConical_GradType | |
kConicalZero_GradType | |
kConicalOut_GradType | |
kConicalOutZero_GradType | |
Definition at line 145 of file GradientBench.cpp.
145 {
153};
@ kConicalOutZero_GradType
◆ geomtypename()
static const char * geomtypename |
( |
GeomType |
gt | ) |
|
|
static |
Definition at line 160 of file GradientBench.cpp.
160 {
161 switch (gt) {
163 return "rectangle";
165 return "oval";
166 default:
168 return "error";
169 }
170}
#define SkDEBUGFAIL(message)
◆ MakeConical()
Ignores scale.
Definition at line 76 of file GradientBench.cpp.
77 {
84 center0, (pts[1].fX - pts[0].fX) / 2,
86}
#define SkScalarAve(a, b)
static SkScalar SkScalarInterp(SkScalar A, SkScalar B, SkScalar t)
static sk_sp< SkShader > MakeTwoPointConical(const SkPoint &start, SkScalar startRadius, const SkPoint &end, SkScalar endRadius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
DEF_SWITCHES_START aot vmservice shared library Name of the *so containing AOT compiled Dart assets for launching the service isolate vm snapshot data
void set(float x, float y)
◆ MakeConicalOutside()
Ignores scale.
Definition at line 102 of file GradientBench.cpp.
103 {
107 center0.
set(pts[0].fX + radius0, pts[0].fY + radius0);
108 center1.
set(pts[1].fX - radius1, pts[1].fY - radius1);
110 center1, radius1,
113}
◆ MakeConicalOutsideZeroRad()
Ignores scale.
Definition at line 116 of file GradientBench.cpp.
117 {
121 center0.
set(pts[0].fX + radius0, pts[0].fY + radius0);
122 center1.
set(pts[1].fX - radius1, pts[1].fY - radius1);
124 center1, radius1,
127}
◆ MakeConicalZeroRad()
Ignores scale.
Definition at line 89 of file GradientBench.cpp.
90 {
97 center0, (pts[1].fX - pts[0].fX) / 2,
99}
◆ MakeLinear()
Ignores scale.
Definition at line 52 of file GradientBench.cpp.
53 {
55}
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
◆ MakeRadial()
Definition at line 57 of file GradientBench.cpp.
58 {
64}
static SkScalar center(float pos0, float pos1)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
◆ MakeSweep()
Ignores scale.
Definition at line 67 of file GradientBench.cpp.
68 {
73}
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
◆ fMaker
◆ fName
◆ gColors
Initial value:= {
}
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
constexpr SkColor SK_ColorBLACK
constexpr SkColor SK_ColorGREEN
constexpr SkColor SK_ColorWHITE
Definition at line 25 of file GradientBench.cpp.
◆ gGradData
Initial value:= {
{ 50,
gColors,
nullptr,
"_hicolor" },
{ 3,
gColors,
nullptr,
"_3color" },
}
static const SkColor gShallowColors[]
static const SkScalar gPos[]
static const SkColor gColors[]
Definition at line 43 of file GradientBench.cpp.
43 {
45 { 50,
gColors,
nullptr,
"_hicolor" },
46 { 3,
gColors,
nullptr,
"_3color" },
49};
◆ [struct]
const struct { ... } gGrads[] |
Initial value:= {
}
static sk_sp< SkShader > MakeConical(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static sk_sp< SkShader > MakeSweep(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static sk_sp< SkShader > MakeConicalZeroRad(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static sk_sp< SkShader > MakeConicalOutside(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static sk_sp< SkShader > MakeConicalOutsideZeroRad(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
static sk_sp< SkShader > MakeRadial()
static sk_sp< SkShader > MakeLinear()
◆ gPos
◆ gShallowColors
const SkColor gShallowColors[] = { 0xFF555555, 0xFF444444 } |
|
static |