public void Draw( IEntity entity, Graphics gc) { Condition.Requires(entity, nameof(entity)).IsNotNull(); if (entity.Type != this.EntityType) { return; } Condition.Requires(gc, nameof(gc)).IsNotNull(); var helper = new PointDrawingHelper(this._drawSettings, entity.X, entity.Y); gc.DrawArc( _pen, helper.GetPointRectangle(0.2), 0, 360); var points = new[] { helper.GetPoint(0.7, 0.2), helper.GetPoint(0.3, 0.3), helper.GetPoint(0.5, 0.5) }; gc.DrawLines( _pen, points); }
private void DrawStick( Graphics gc, PointDrawingHelper helper) { Condition.Requires(gc, nameof(gc)).IsNotNull(); Condition.Requires(helper, nameof(helper)).IsNotNull(); gc.DrawLine(this._stickPen, helper.GetPoint(0.3, 0.3), helper.GetPoint(0.9, 0.9)); }
private void DrawFire( Graphics gc, PointDrawingHelper helper) { Condition.Requires(gc, nameof(gc)).IsNotNull(); Condition.Requires(helper, nameof(helper)).IsNotNull(); gc.DrawLine(this._firePen, helper.GetPoint(0.2, 0.2), helper.GetPoint(0.4, 0.4)); }