From 1d32aa0b0fc463e3a756a24da15c8befc7e63b8e Mon Sep 17 00:00:00 2001 From: dlopatin Date: Mon, 15 Apr 2024 17:25:50 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9F=D0=B5=D1=80=D0=B5=D1=80=D0=B8=D1=81?= =?UTF-8?q?=D0=BE=D0=B2=D0=BA=D0=B0=20=D0=BB=D0=BE=D0=BA=D0=BE=D0=BC=D0=BE?= =?UTF-8?q?=D1=82=D0=B8=D0=B2=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Drawnings/DrawningLocomotive.cs | 34 +++++++++---------- .../Drawnings/DrawningWarmlyLocomotive.cs | 4 +++ 2 files changed, 21 insertions(+), 17 deletions(-) diff --git a/WarmlyLocomotive/Drawnings/DrawningLocomotive.cs b/WarmlyLocomotive/Drawnings/DrawningLocomotive.cs index cbd2f8c..743dc42 100644 --- a/WarmlyLocomotive/Drawnings/DrawningLocomotive.cs +++ b/WarmlyLocomotive/Drawnings/DrawningLocomotive.cs @@ -33,7 +33,7 @@ public class DrawningLocomotive /// /// Высота прорисовки паровоза /// - private readonly int _drawningLocomotiveHeight = 100; + private readonly int _drawningLocomotiveHeight = 70; /// /// Координата X объекта @@ -249,27 +249,27 @@ public class DrawningLocomotive //локомотив Brush br = new SolidBrush(EntityLocomotive.BodyColor); Brush blBr = new SolidBrush(Color.Black); - g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 60, 140, 20); - g.FillRectangle(br, _startPosX.Value, _startPosY.Value + 60, 140, 20); - Point point1 = new Point(_startPosX.Value, _startPosY.Value + 60); - Point point2 = new Point(_startPosX.Value + 20, _startPosY.Value + 30); - Point point3 = new Point(_startPosX.Value + 140, _startPosY.Value + 30); - Point point4 = new Point(_startPosX.Value + 140, _startPosY.Value + 60); + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 30, 140, 20); + g.FillRectangle(br, _startPosX.Value, _startPosY.Value + 30, 140, 20); + Point point1 = new Point(_startPosX.Value, _startPosY.Value + 30); + Point point2 = new Point(_startPosX.Value + 20, _startPosY.Value); + Point point3 = new Point(_startPosX.Value + 140, _startPosY.Value); + Point point4 = new Point(_startPosX.Value + 140, _startPosY.Value + 30); Point[] body = { point1, point2, point3, point4 }; g.DrawPolygon(pen, body); g.FillPolygon(br, body); - g.DrawRectangle(pen, _startPosX.Value + 140, _startPosY.Value + 40, 10, 40); - g.FillRectangle(br, _startPosX.Value + 140, _startPosY.Value + 40, 10, 40); + g.DrawRectangle(pen, _startPosX.Value + 140, _startPosY.Value + 10, 10, 40); + g.FillRectangle(br, _startPosX.Value + 140, _startPosY.Value + 10, 10, 40); //колеса - g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 80, 20, 20); - g.FillEllipse(blBr, _startPosX.Value, _startPosY.Value + 80, 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 80, 20, 20); - g.FillEllipse(blBr, _startPosX.Value + 30, _startPosY.Value + 80, 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + 80, 20, 20); - g.FillEllipse(blBr, _startPosX.Value + 90, _startPosY.Value + 80, 20, 20); - g.DrawEllipse(pen, _startPosX.Value + 120, _startPosY.Value + 80, 20, 20); - g.FillEllipse(blBr, _startPosX.Value + 120, _startPosY.Value + 80, 20, 20); + g.DrawEllipse(pen, _startPosX.Value, _startPosY.Value + 50, 20, 20); + g.FillEllipse(blBr, _startPosX.Value, _startPosY.Value + 50, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 30, _startPosY.Value + 50, 20, 20); + g.FillEllipse(blBr, _startPosX.Value + 30, _startPosY.Value + 50, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 90, _startPosY.Value + 50, 20, 20); + g.FillEllipse(blBr, _startPosX.Value + 90, _startPosY.Value + 50, 20, 20); + g.DrawEllipse(pen, _startPosX.Value + 120, _startPosY.Value + 50, 20, 20); + g.FillEllipse(blBr, _startPosX.Value + 120, _startPosY.Value + 50, 20, 20); // отсек для топлива //if (EntityWarmlyLocomotive.FuelTank) diff --git a/WarmlyLocomotive/Drawnings/DrawningWarmlyLocomotive.cs b/WarmlyLocomotive/Drawnings/DrawningWarmlyLocomotive.cs index e8fbfdb..e8e535f 100644 --- a/WarmlyLocomotive/Drawnings/DrawningWarmlyLocomotive.cs +++ b/WarmlyLocomotive/Drawnings/DrawningWarmlyLocomotive.cs @@ -32,6 +32,9 @@ public class DrawningWarmlyLocomotive : DrawningLocomotive g.FillRectangle(additionalBrush, _startPosX.Value + 40, _startPosY.Value, 20, 40); } + _startPosY += 30; + base.DrawTransport(g); + _startPosY -= 30; // отсек для топлива if (warmlyLocomotive.FuelTank) @@ -39,6 +42,7 @@ public class DrawningWarmlyLocomotive : DrawningLocomotive g.DrawRectangle(pen, _startPosX.Value + 80, _startPosY.Value + 40, 50, 40); g.FillRectangle(additionalBrush, _startPosX.Value + 80, _startPosY.Value + 40, 50, 40); } + } } \ No newline at end of file