Add pivot offset for rotations.

This commit is contained in:
2023-09-25 18:44:35 +02:00
parent ea2733f594
commit 8aab1132b6
8 changed files with 27 additions and 17 deletions

View File

@@ -9,6 +9,7 @@ public class RectangleShape2d : Drawable2d
public Color Color { get; set; } = Color.White;
public override void OnDraw(Renderer renderer)
{
PivotOffset = Size / 2;
renderer.DrawRectangle(Size, Color);
}
}