Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add missing paint arguments on shapes #1727

Merged
merged 2 commits into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/flame/lib/src/geometry/circle_component.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:math';
import 'dart:ui';

import 'package:flame/components.dart';
import 'package:flame/extensions.dart';
Expand Down Expand Up @@ -31,11 +32,13 @@ class CircleComponent extends ShapeComponent implements SizeProvider {
required Vector2 parentSize,
double angle = 0,
Anchor? anchor,
Paint? paint,
}) : this(
radius: relation * (min(parentSize.x, parentSize.y) / 2),
position: position,
angle: angle,
anchor: anchor,
paint: paint,
);

/// Get the radius of the circle before scaling.
Expand Down
2 changes: 2 additions & 0 deletions packages/flame/lib/src/geometry/rectangle_component.dart
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ class RectangleComponent extends PolygonComponent {
double? angle,
Anchor anchor = Anchor.topLeft,
int? priority,
Paint? paint,
}) {
return RectangleComponent(
position: anchor == Anchor.topLeft
Expand All @@ -90,6 +91,7 @@ class RectangleComponent extends PolygonComponent {
angle: angle,
anchor: anchor,
priority: priority,
paint: paint,
);
}

Expand Down