drawLightSnow method

void drawLightSnow(
  1. Canvas canvas,
  2. Size size
)

绘制小雪

Implementation

void drawLightSnow(Canvas canvas, Size size) {
  ui.Image image = images[0];
  canvas.save();
  const identity = ColorFilter.matrix(<double>[
    0.67,
    0,
    0,
    0,
    0,
    0,
    0.75,
    0,
    0,
    0,
    0,
    0,
    0.87,
    0,
    0,
    0,
    0,
    0,
    1,
    0,
  ]);
  _paint.colorFilter = identity;
  final scale = 0.8 * widthRatio;
  ui.Offset offset1 = const ui.Offset(-380, -100);
  ui.Offset offset2 = const ui.Offset(0, -170);
  canvas.scale(scale, scale);
  canvas.drawImage(image, offset1, _paint);
  canvas.drawImage(image, offset2, _paint);
  canvas.restore();
}