using RemSox.Shared.UI.GUI.Rendering; using System.Drawing; namespace RemSox.Kernel.UI.GUI.UIEelements.Shapes; public class Rectangle() : Shape("Rectangle") { public Size Size { get; set => SetProperty(nameof(Size), ref field, value); } public bool IsFilled { get; set => SetProperty(nameof(IsFilled), ref field, value); } = true; public override IEnumerable ToPrimitives(int windowId) { yield return new RenderCommand { WindowId = windowId, ElementId = PrimitiveId(0), Type = IsFilled ? RenderCommandType.DrawFilledRect : RenderCommandType.DrawRectBorder, Position = Position, Properties = new Dictionary { ["Color"] = Color, ["Size"] = Size, } }; } }