111 {
112 using std::make_tuple;
113
114 static constexpr struct {
115 std::tuple<float, float>
h,
s, l;
117 { make_tuple(-0.5f, 0.5f), make_tuple( 0.0f, 0.0f), make_tuple( 0.0f, 0.0f) },
118 { make_tuple( 0.0f, 0.0f), make_tuple(-1.0f, 1.0f), make_tuple( 0.0f, 0.0f) },
119 { make_tuple( 0.0f, 0.0f), make_tuple( 0.0f, 0.0f), make_tuple(-1.0f, 1.0f) },
120 };
121
123
126
127 for (const auto& shader : fShaders) {
128 paint.setShader(shader);
129
130 for (
const auto& tst:
gTests) {
132
139 {
141 for (
size_t i = 0;
i < kSteps; ++
i) {
142 paint.setColorFilter(make_filter(
h,
s, l));
148 l += dl;
149 }
150 }
152 }
154 }
155 }
static const TestCase gTests[]
void drawRect(const SkRect &rect, const SkPaint &paint)
void translate(SkScalar dx, SkScalar dy)
void drawColor(SkColor color, SkBlendMode mode=SkBlendMode::kSrcOver)
sk_sp< SkBlender > blender SkRect rect
const myers::Point & get< 1 >(const myers::Segment &s)
const myers::Point & get< 0 >(const myers::Segment &s)
static constexpr SkRect MakeWH(float w, float h)