PolygonComponent constructor

PolygonComponent(
  1. List<Vector2> _vertices, {
  2. Vector2? position,
  3. Vector2? size,
  4. Vector2? scale,
  5. double? angle,
  6. Anchor? anchor,
  7. Iterable<Component>? children,
  8. int? priority,
  9. Paint? paint,
  10. List<Paint>? paintLayers,
  11. ComponentKey? key,
  12. bool isSolid = false,
  13. bool? shrinkToBounds,
})

With this constructor you create your PolygonComponent from positions anywhere in the 2d-space. It will automatically calculate the size of the Polygon (the bounding box) if no size is given.