Lines Matching refs:size
24 static sk_sp<SkShader> shader_linear(const SkColor colors[], int count, const SkSize& size) {
25 SkPoint pts[] = { { 0, 0 }, { size.width(), size.height() } };
29 static sk_sp<SkShader> shader_radial(const SkColor colors[], int count, const SkSize& size) {
30 SkPoint center = { size.width()/2, size.height()/2 };
31 return SkGradientShader::MakeRadial(center, size.width()/2, colors, nullptr, count,
35 static sk_sp<SkShader> shader_conical(const SkColor colors[], int count, const SkSize& size) {
36 SkPoint center = { size.width()/2, size.height()/2 };
37 return SkGradientShader::MakeTwoPointConical(center, size.width()/64, center, size.width()/2,
41 static sk_sp<SkShader> shader_sweep(const SkColor colors[], int count, const SkSize& size) {
42 return SkGradientShader::MakeSweep(size.width()/2, size.height()/2, colors, nullptr, count);
66 SkSize size = SkSize::Make(r.width(), r.height());
69 paint.setShader(fProc(colors, colorCount, size));