SpriteComponent.fromImage constructor

SpriteComponent.fromImage(
  1. Image image, {
  2. Vector2? srcPosition,
  3. Vector2? srcSize,
  4. bool? autoResize,
  5. Paint? paint,
  6. Vector2? position,
  7. Vector2? size,
  8. Vector2? scale,
  9. double? angle,
  10. double nativeAngle = 0,
  11. Anchor? anchor,
  12. Iterable<Component>? children,
  13. int? priority,
  14. ComponentKey? key,
})

Implementation

SpriteComponent.fromImage(
  Image image, {
  Vector2? srcPosition,
  Vector2? srcSize,
  bool? autoResize,
  Paint? paint,
  Vector2? position,
  Vector2? size,
  Vector2? scale,
  double? angle,
  double nativeAngle = 0,
  Anchor? anchor,
  Iterable<Component>? children,
  int? priority,
  ComponentKey? key,
}) : this(
        sprite: Sprite(
          image,
          srcPosition: srcPosition,
          srcSize: srcSize,
        ),
        autoResize: autoResize,
        paint: paint,
        position: position,
        size: size,
        scale: scale,
        angle: angle,
        nativeAngle: nativeAngle,
        anchor: anchor,
        children: children,
        priority: priority,
        key: key,
      );