CircleComponent constructor

CircleComponent({
  1. double? radius,
  2. Vector2? position,
  3. Vector2? scale,
  4. double? angle,
  5. Anchor? anchor,
  6. Iterable<Component>? children,
  7. int? priority,
  8. Paint? paint,
  9. List<Paint>? paintLayers,
})

With this constructor you can create your CircleComponent from a radius and a position. It will also calculate the bounding rectangle size for the CircleComponent.

Implementation

CircleComponent({
  double? radius,
  super.position,
  super.scale,
  super.angle,
  super.anchor,
  super.children,
  super.priority,
  super.paint,
  super.paintLayers,
}) : super(size: Vector2.all((radius ?? 0) * 2));