drawSmallSizedStar method

void drawSmallSizedStar(
  1. Canvas canvas,
  2. Star star,
  3. Paint paint
)

Draw a smaller Star using a variable size, which will be determined using a random number to achieve a more realistic starfield. Its size will depend on the current animation state. If it is not animated, the Star will be using a fixed size.

Implementation

void drawSmallSizedStar(Canvas canvas, Star star, Paint paint) {
  canvas.drawCircle(star.translatedOffset, (star.radius), paint);
}