Skip to content

Commit

Permalink
fix: Add missing paint argument to SpriteComponent.fromImage (#1294)
Browse files Browse the repository at this point in the history
Adding the paint argument which exists in the normal SpriteComponent constructor to the named SpriteComponent.fromImage constructor.
  • Loading branch information
spydon committed Jan 7, 2022
1 parent d62e47f commit 254a60c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/flame/lib/src/components/sprite_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class SpriteComponent extends PositionComponent with HasPaint {
Image image, {
Vector2? srcPosition,
Vector2? srcSize,
Paint? paint,
Vector2? position,
Vector2? size,
Vector2? scale,
Expand All @@ -55,6 +56,7 @@ class SpriteComponent extends PositionComponent with HasPaint {
srcPosition: srcPosition,
srcSize: srcSize,
),
paint: paint,
position: position,
size: size ?? srcSize ?? image.size,
scale: scale,
Expand Down

0 comments on commit 254a60c

Please sign in to comment.