8#ifndef SkGradientShader_DEFINED
9#define SkGradientShader_DEFINED
68 kInterpolateColorsInPremul_Flag = 1 << 0,
97 kLastColorSpace = kHWB,
99 static constexpr int kColorSpaceCount =
static_cast<int>(ColorSpace::kLastColorSpace) + 1;
108 kLastHueMethod = kDecreasing,
110 static constexpr int kHueMethodCount =
static_cast<int>(HueMethod::kLastHueMethod) + 1;
117 return {
flags & kInterpolateColorsInPremul_Flag ? InPremul::kYes : InPremul::kNo,
118 ColorSpace::kDestination,
119 HueMethod::kShorter};
165 const Interpolation& interpolation,
172 Interpolation::FromFlags(
flags), localMatrix);
215 const Interpolation& interpolation,
222 Interpolation::FromFlags(
flags), localMatrix);
236 const SkMatrix* localMatrix =
nullptr);
249 const Interpolation& interpolation,
257 const SkMatrix* localMatrix =
nullptr) {
258 return MakeTwoPointConical(
start, startRadius,
end, endRadius,
colors,
260 Interpolation::FromFlags(
flags), localMatrix);
334 const Interpolation& interpolation,
343 endAngle, Interpolation::FromFlags(
flags), localMatrix);
350 0, 360,
flags, localMatrix);
static sk_sp< SkShader > MakeSweep(const SkPoint pts[2], const GradData &data, SkTileMode tm, float scale)
Ignores scale.
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)
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
static SkScalar center(float pos0, float pos1)
static sk_sp< SkShader > MakeLinear(const SkPoint pts[2], const SkColor4f colors[], sk_sp< SkColorSpace > colorSpace, const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor colors[], const SkScalar pos[], int count, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeTwoPointConical(const SkPoint &start, SkScalar startRadius, const SkPoint &end, SkScalar endRadius, const SkColor4f colors[], sk_sp< SkColorSpace > colorSpace, const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor4f colors[], sk_sp< SkColorSpace > colorSpace, const SkScalar pos[], int count, SkTileMode mode, SkScalar startAngle, SkScalar endAngle, uint32_t flags, const SkMatrix *localMatrix)
static sk_sp< SkShader > MakeSweep(SkScalar cx, SkScalar cy, const SkColor4f colors[], sk_sp< SkColorSpace > colorSpace, const SkScalar pos[], int count, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
static sk_sp< SkShader > MakeRadial(const SkPoint ¢er, SkScalar radius, const SkColor4f colors[], sk_sp< SkColorSpace > colorSpace, const SkScalar pos[], int count, SkTileMode mode, uint32_t flags=0, const SkMatrix *localMatrix=nullptr)
FlutterSemanticsFlag flags
PODArray< SkColor > colors
it will be possible to load the file into Perfetto s trace viewer disable asset Prevents usage of any non test fonts unless they were explicitly Loaded via prefetched default font Indicates whether the embedding started a prefetch of the default font manager before creating the engine run In non interactive mode
static Interpolation FromFlags(uint32_t flags)