diff --git a/GasolineTanker/GasolineTanker/Drawnings/DrawningGasolineTanker.cs b/GasolineTanker/GasolineTanker/Drawnings/DrawningGasolineTanker.cs index 1314ccf..805da6e 100644 --- a/GasolineTanker/GasolineTanker/Drawnings/DrawningGasolineTanker.cs +++ b/GasolineTanker/GasolineTanker/Drawnings/DrawningGasolineTanker.cs @@ -17,7 +17,7 @@ public class DrawningGasolineTanker : DrawningTanker /// Признак наличия сигнального маячка /// Признак наличия цистерны - public DrawningGasolineTanker(int speed, double weight, Color bodyColor, Color additionalColor, bool signalBeacon, bool cistern) : base(155, 95) + public DrawningGasolineTanker(int speed, double weight, Color bodyColor, Color additionalColor, bool signalBeacon, bool cistern) : base(130, 90) { EntityTanker = new EntityGasolineTanker(speed, weight, bodyColor, additionalColor, signalBeacon, cistern); } @@ -32,22 +32,22 @@ public class DrawningGasolineTanker : DrawningTanker Pen pen = new(Color.Black); Brush additionalBrush = new SolidBrush(gasolineTanker.AdditionalColor); - base.DrawTransport(g); - // Цистерна if (gasolineTanker.Cistern) { - g.FillRectangle(additionalBrush, _startPosX.Value + 25, _startPosY.Value + 15, 90, 40); - g.FillRectangle(additionalBrush, _startPosX.Value + 80, _startPosY.Value + 10, 10, 5); + g.FillRectangle(additionalBrush, _startPosX.Value, _startPosY.Value + 10, 90, 40); + g.FillRectangle(additionalBrush, _startPosX.Value + 55, _startPosY.Value + 5, 10, 5); } // Сигнальный маячок if (gasolineTanker.SignalBeacon) { - g.FillRectangle(additionalBrush, _startPosX.Value + 145, _startPosY.Value + 5, 10, 10); + g.FillRectangle(additionalBrush, _startPosX.Value + 120, _startPosY.Value, 10, 10); } + _startPosY += 10; + base.DrawTransport(g); + _startPosY -= 10; } -} - +} \ No newline at end of file diff --git a/GasolineTanker/GasolineTanker/Drawnings/DrawningTanker.cs b/GasolineTanker/GasolineTanker/Drawnings/DrawningTanker.cs index 88f0078..30278b1 100644 --- a/GasolineTanker/GasolineTanker/Drawnings/DrawningTanker.cs +++ b/GasolineTanker/GasolineTanker/Drawnings/DrawningTanker.cs @@ -39,12 +39,12 @@ public class DrawningTanker /// /// Ширина прорисовки грузовика /// - private readonly int _drawningTankerWidth = 155; + private readonly int _drawningTankerWidth = 130; /// /// Высота прорисовки грузовика /// - private readonly int _drawningTankerHeight = 95; + private readonly int _drawningTankerHeight = 80; /// /// Координата X объекта @@ -209,26 +209,26 @@ public class DrawningTanker // Границы бензовоза - g.DrawRectangle(pen, _startPosX.Value + 120, _startPosY.Value + 20, 25, 25); - g.DrawRectangle(pen, _startPosX.Value + 115, _startPosY.Value + 15, 40, 40); - g.DrawRectangle(pen, _startPosX.Value + 25, _startPosY.Value + 55, 130, 15); + g.DrawRectangle(pen, _startPosX.Value + 95, _startPosY.Value + 5, 25, 25); + g.DrawRectangle(pen, _startPosX.Value + 90, _startPosY.Value, 40, 40); + g.DrawRectangle(pen, _startPosX.Value, _startPosY.Value + 40, 130, 15); // Колеса Brush brBlack = new SolidBrush(Color.Black); - g.FillEllipse(brBlack, _startPosX.Value + 130, _startPosY.Value + 70, 25, 25); - g.FillEllipse(brBlack, _startPosX.Value + 30, _startPosY.Value + 70, 25, 25); - g.FillEllipse(brBlack, _startPosX.Value + 55, _startPosY.Value + 70, 25, 25); + g.FillEllipse(brBlack, _startPosX.Value + 105, _startPosY.Value + 55, 25, 25); + g.FillEllipse(brBlack, _startPosX.Value + 5, _startPosY.Value + 55, 25, 25); + g.FillEllipse(brBlack, _startPosX.Value + 30, _startPosY.Value + 55, 25, 25); // Кузов Brush br = new SolidBrush(EntityTanker.BodyColor); - g.FillRectangle(br, _startPosX.Value + 116, _startPosY.Value + 16, 39, 39); - g.FillRectangle(br, _startPosX.Value + 26, _startPosY.Value + 56, 129, 14); + g.FillRectangle(br, _startPosX.Value + 91, _startPosY.Value + 1, 39, 39); + g.FillRectangle(br, _startPosX.Value + 1, _startPosY.Value + 41, 129, 14); // Стекло Brush brBlue = new SolidBrush(Color.LightBlue); - g.FillRectangle(brBlue, _startPosX.Value + 120, _startPosY.Value + 20, 25, 25); + g.FillRectangle(brBlue, _startPosX.Value + 95, _startPosY.Value + 5, 25, 25); } } \ No newline at end of file