public void Draw(DrawingContext2D context) { if (SelectionBoxVisible) { context.FillRectangle(SelectionRectangle, new ColorRgbaF(1, 1, 1, 0.1f)); context.DrawRectangle(SelectionRectangle.ToRectangleF(), ColorRgbaF.Black, 2); } }
public void Draw(DrawingContext2D context, CameraComponent camera) { foreach (var collider in SelectedObjects) { var rect = collider.GetBoundingRectangle(camera); context.FillRectangle(rect, new ColorRgbaF(1, 0, 0, 0.2f)); context.DrawRectangle(rect.ToRectangleF(), ColorRgbaF.Black, 2); } if (SelectionBoxVisible) { context.FillRectangle(SelectionRectangle, new ColorRgbaF(1, 1, 1, 0.1f)); context.DrawRectangle(SelectionRectangle.ToRectangleF(), ColorRgbaF.Black, 2); } }