4REG_FIDDLE(GradientShader_MakeLinear, 201, 201,
false, 0) {
19 SkScalar positions[] = { 0.0, 0.65, 1.0 };
21 for (
int i = 0;
i < 4;
i++) {
24 SkPoint pts[] = { {blockX, blockY}, {blockX + 50, blockY + 100} };
29 flags = SkGradientShader::Flags::kInterpolateColorsInPremul_Flag;
REG_FIDDLE(GradientShader_MakeLinear, 201, 201, false, 0)
constexpr SkColor SK_ColorBLUE
constexpr SkColor SK_ColorRED
static constexpr SkColor SkColorSetARGB(U8CPU a, U8CPU r, U8CPU g, U8CPU b)
constexpr SkColor SK_ColorBLACK
static void draw(SkCanvas *canvas, SkRect &target, int x, int y)
void drawRect(const SkRect &rect, const SkPaint &paint)
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)
SkMatrix & setRotate(SkScalar degrees, SkScalar px, SkScalar py)
static const SkMatrix & I()
void setStyle(Style style)
void setColor(SkColor color)
@ kStroke_Style
set to stroke geometry
@ kFill_Style
set to fill geometry
FlutterSemanticsFlag flags
PODArray< SkColor > colors
static constexpr SkRect MakeLTRB(float l, float t, float r, float b)