drawBackground method

void drawBackground(
  1. Canvas canvas,
  2. Size size,
  3. SpaceViewModel viewModel
)

Draws the Background

It's size is "big enough" to cover the screen it's centered and rotated at the same speed as the star layer

Implementation

void drawBackground(Canvas canvas, Size size, SpaceViewModel viewModel) =>
    _imageMap["stars"]?.drawRotatedSquare(
        canvas: canvas,
        size: viewModel.backgroundSize,
        offset: viewModel.centerOffset,
        rotation: viewModel.backgroundRotation,
        paint: standardPaint);