private void DrawDirection( Graphics gc, PointDrawingHelper drawingHelper, LazerEntity lazer) { var rectangle = drawingHelper.GetPointRectangle(); var point1 = drawingHelper.GetCentrePoint(); var point2 = drawingHelper.GetLazerDirectionPoint(lazer.GlowDirection); gc.DrawLine(this._redPen, point1, point2); }
private void DrawMainRectangle( Graphics gc, PointDrawingHelper helper) { Condition.Requires(gc, nameof(gc)).IsNotNull(); Condition.Requires(helper, nameof(helper)).IsNotNull(); var mainRectangle = helper.GetPointRectangle(); gc.FillEllipse(this._blackBrush, mainRectangle); }
private void DrawMainBlueCircle( Graphics gc, PointDrawingHelper drawingHelper, LazerEntity lazer) { var rectangle = drawingHelper.GetPointRectangle(); gc.FillEllipse( this.GetMainBrush(lazer.State), rectangle); }
private void DrawOutline( Graphics gc, PointDrawingHelper helper) { Condition.Requires(gc, nameof(gc)).IsNotNull(); Condition.Requires(helper, nameof(helper)).IsNotNull(); gc.DrawRectangle( _outlinePen, helper.GetPointRectangle(offsetFromSide: 1)); }
private void DrawBackground( Graphics gc, PointDrawingHelper helper) { Condition.Requires(gc, nameof(gc)).IsNotNull(); Condition.Requires(helper, nameof(helper)).IsNotNull(); gc.FillRectangle( _backgroundBrush, helper.GetPointRectangle()); }
private void DrawWickRectangle( BombEntity bomb, Graphics gc, PointDrawingHelper helper) { Condition.Requires(bomb, nameof(bomb)).IsNotNull(); Condition.Requires(gc, nameof(gc)).IsNotNull(); Condition.Requires(helper, nameof(helper)).IsNotNull(); var wickRectangle = helper.GetPointRectangle(0.1); gc.FillEllipse( this.GetWickBruch(bomb), wickRectangle); }
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.FillRectangle(this._brush, helper.GetPointRectangle()); }
private void DrawDirection( Graphics gc, PointDrawingHelper drawingHelper, MirrorEntity mirror) { var rectangle = drawingHelper.GetPointRectangle(); var point1 = mirror.Position == MirrorPosition.MainDiagonal ? drawingHelper.GetCornerPointLeftTop() : drawingHelper.GetCornerPointRightTop(); var point2 = mirror.Position == MirrorPosition.MainDiagonal ? drawingHelper.GetCornerPointRightDown() : drawingHelper.GetCornerPointLeftDown(); gc.DrawLine(this._brownPen, point1, point2); gc.DrawLine(this._bluePen, point1, point2); }