drawHeavyRainy method
绘制大雨
Implementation
void drawHeavyRainy(Canvas canvas, Size size) {
ui.Image image = images[0];
canvas.save();
const identity = ColorFilter.matrix(<double>[
0.19,
0,
0,
0,
0,
0,
0.2,
0,
0,
0,
0,
0,
0.22,
0,
0,
0,
0,
0,
1,
0,
]);
_paint.colorFilter = identity;
final scale = 0.8 * widthRatio;
ui.Offset offset1 = const ui.Offset(-380, -150);
ui.Offset offset2 = const ui.Offset(0, -60);
ui.Offset offset3 = const ui.Offset(0, 60);
canvas.scale(scale, scale);
canvas.drawImage(image, offset1, _paint);
canvas.drawImage(image, offset2, _paint);
canvas.drawImage(image, offset3, _paint);
canvas.restore();
}