From 96477035a81a6e00b547278473a5ebaf88bcaf1d Mon Sep 17 00:00:00 2001 From: Danil Malin Date: Sat, 24 Sep 2022 14:00:29 +0400 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D1=80=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=BE=D1=82=D1=80=D0=B8=D1=81=D0=BE=D0=B2?= =?UTF-8?q?=D0=BA=D0=B0=20=D0=BE=D0=B1=D1=8A=D0=B5=D0=BA=D1=82=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../WarmlyLocomotive/DrawningLocomotive.cs | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/WarmlyLocomotive/WarmlyLocomotive/DrawningLocomotive.cs b/WarmlyLocomotive/WarmlyLocomotive/DrawningLocomotive.cs index 24aeb64..be7dfbb 100644 --- a/WarmlyLocomotive/WarmlyLocomotive/DrawningLocomotive.cs +++ b/WarmlyLocomotive/WarmlyLocomotive/DrawningLocomotive.cs @@ -123,13 +123,13 @@ namespace WarmlyLocomotive Pen pen = new(Color.Black); Brush br = new SolidBrush(Locomotive?.BodyColor ?? Color.Black); //кузов - PointF[] polygon_points = new PointF[4]; - polygon_points[0] = new PointF(_startPosX + 10, _startPosY); - polygon_points[1] = new PointF(_startPosX + 190, _startPosY); - polygon_points[2] = new PointF(_startPosX + 210, _startPosY + 40); - polygon_points[3] = new PointF(_startPosX + 10, _startPosY + 40); - g.FillPolygon(br, polygon_points); - g.DrawPolygon(pen, polygon_points); + PointF[] polygonPoints = new PointF[4]; + polygonPoints[0] = new PointF(_startPosX + 10, _startPosY); + polygonPoints[1] = new PointF(_startPosX + 190, _startPosY); + polygonPoints[2] = new PointF(_startPosX + 210, _startPosY + 40); + polygonPoints[3] = new PointF(_startPosX + 10, _startPosY + 40); + g.FillPolygon(br, polygonPoints); + g.DrawPolygon(pen, polygonPoints); g.FillRectangle(br, _startPosX + 10, _startPosY + 40, 200, 40); g.DrawRectangle(pen, _startPosX + 10, _startPosY + 40, 200, 40); //колеса @@ -138,6 +138,11 @@ namespace WarmlyLocomotive g.FillEllipse(brGray, _startPosX + 70, _startPosY + 80, 30, 25); g.FillEllipse(brGray, _startPosX + 130, _startPosY + 80, 30, 25); g.FillEllipse(brGray, _startPosX + 170, _startPosY + 80, 30, 25); + Pen dopPen = new(Color.Black, 2); + g.DrawEllipse(dopPen, _startPosX + 30, _startPosY + 80, 30, 25); + g.DrawEllipse(dopPen, _startPosX + 70, _startPosY + 80, 30, 25); + g.DrawEllipse(dopPen, _startPosX + 130, _startPosY + 80, 30, 25); + g.DrawEllipse(dopPen, _startPosX + 170, _startPosY + 80, 30, 25); //стекла и дверь Brush brBrown = new SolidBrush(Color.Brown); g.FillRectangle(brBrown, _startPosX + 100, _startPosY + 20, 25, 45);