157 {
160
161 const char* comment = "HSL blend modes are correct when you see no circles in the squares.";
162 canvas->drawString(comment, 10,10,
font,
paint);
163
164
168
169 struct {
179 };
181 canvas->drawRect({20,20,80,80}, bg);
182
184 canvas->drawRect({20,20,80,80}, fg);
185
186 if (
test.reference) {
189 canvas->drawCircle(50,50, 20, ref);
190 }
191
193
194 canvas->translate(100,0);
195 }
196}
SK_API const char * SkBlendMode_Name(SkBlendMode blendMode)
@ kSaturation
saturation of source with hue and luminosity of destination
@ kHue
hue of source with saturation and luminosity of destination
@ kLuminosity
luminosity of source with hue and saturation of destination
@ kColor
hue and saturation of source with luminosity of destination
void setColor(SkColor color)
void setBlendMode(SkBlendMode mode)
static SkColor blend(SkColor dst, SkColor src, void(*mode)(float, float, float, float *, float *, float *))
static void color(float dr, float dg, float db, float *sr, float *sg, float *sb)
static void luminosity(float dr, float dg, float db, float *sr, float *sg, float *sb)
static void hue(float dr, float dg, float db, float *sr, float *sg, float *sb)
static void saturation(float dr, float dg, float db, float *sr, float *sg, float *sb)
font
Font Metadata and Metrics.