fix: Adding scale parameter to RectangleComponent constructors (#2730)

While working with RectangleComponent I noticed that it doesn't expose
its super `scale` parameter, this PR changes that.
This commit is contained in:
Erick
2023-09-12 18:17:05 -03:00
committed by GitHub
parent c1ee24a289
commit 173908d9f2
2 changed files with 6 additions and 0 deletions

View File

@ -14,6 +14,7 @@ class CircleComponent extends ShapeComponent implements SizeProvider {
CircleComponent({
double? radius,
super.position,
super.scale,
super.angle,
super.anchor,
super.children,
@ -29,6 +30,7 @@ class CircleComponent extends ShapeComponent implements SizeProvider {
double relation, {
required Vector2 parentSize,
super.position,
super.scale,
super.angle,
super.anchor,
super.paint,

View File

@ -8,6 +8,7 @@ class RectangleComponent extends PolygonComponent {
RectangleComponent({
super.position,
super.size,
super.scale,
super.angle,
super.anchor,
super.children,
@ -27,6 +28,7 @@ class RectangleComponent extends PolygonComponent {
RectangleComponent.square({
double size = 0,
super.position,
super.scale,
super.angle,
super.anchor,
super.priority,
@ -76,6 +78,7 @@ class RectangleComponent extends PolygonComponent {
/// This factory will create a [RectangleComponent] from a positioned [Rect].
factory RectangleComponent.fromRect(
Rect rect, {
Vector2? scale,
double? angle,
Anchor anchor = Anchor.topLeft,
int? priority,
@ -92,6 +95,7 @@ class RectangleComponent extends PolygonComponent {
rect.size.toVector2(),
),
size: rect.size.toVector2(),
scale: scale,
angle: angle,
anchor: anchor,
priority: priority,