Корректировка прорисовки

This commit is contained in:
Anastasia Yazykova 2024-04-03 00:02:15 +04:00
parent ab92a28aff
commit 8e476617e1
2 changed files with 63 additions and 41 deletions

View File

@ -266,49 +266,49 @@ public class DrawningBus
Brush brushBodyColor = new SolidBrush(EntityBus.BodyColor); Brush brushBodyColor = new SolidBrush(EntityBus.BodyColor);
//троллейбус границы //троллейбус границы
g.DrawEllipse(pen, _startPosX.Value + 27, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 22, _startPosY.Value +
64, 20, 20); 42, 20, 20);
g.DrawEllipse(pen, _startPosX.Value + 109, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 104, _startPosY.Value +
64, 20, 20); 42, 20, 20);
g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value +
30, 140, 41); 8, 140, 41);
//троллейбус //троллейбус
g.FillRectangle(brushBodyColor, _startPosX.Value + 10, _startPosY.Value + g.FillRectangle(brushBodyColor, _startPosX.Value + 5, _startPosY.Value +
30, 140, 41); 8, 140, 41);
g.DrawRectangle(pen, _startPosX.Value + 10, _startPosY.Value + g.DrawRectangle(pen, _startPosX.Value + 5, _startPosY.Value +
30, 140, 41); 8, 140, 41);
//дверь //дверь
g.DrawRectangle(pen, _startPosX.Value + 57, _startPosY.Value + g.DrawRectangle(pen, _startPosX.Value + 52, _startPosY.Value +
40, 24, 31); 18, 24, 31);
//окна //окна
Brush brBlue = new SolidBrush(Color.LightBlue); Brush brBlue = new SolidBrush(Color.LightBlue);
g.FillEllipse(brBlue, _startPosX.Value + 13, _startPosY.Value + g.FillEllipse(brBlue, _startPosX.Value + 8, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.FillEllipse(brBlue, _startPosX.Value + 38, _startPosY.Value + g.FillEllipse(brBlue, _startPosX.Value + 33, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.FillEllipse(brBlue, _startPosX.Value + 85, _startPosY.Value + g.FillEllipse(brBlue, _startPosX.Value + 80, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.FillEllipse(brBlue, _startPosX.Value + 102, _startPosY.Value + g.FillEllipse(brBlue, _startPosX.Value + 97, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.FillEllipse(brBlue, _startPosX.Value + 118, _startPosY.Value + g.FillEllipse(brBlue, _startPosX.Value + 113, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.FillEllipse(brBlue, _startPosX.Value + 134, _startPosY.Value + g.FillEllipse(brBlue, _startPosX.Value + 129, _startPosY.Value +
34, 15, 20); 12, 15, 20);
@ -318,21 +318,21 @@ public class DrawningBus
g.DrawEllipse(pen, _startPosX.Value + 13, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 8, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.DrawEllipse(pen, _startPosX.Value + 38, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 33, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.DrawEllipse(pen, _startPosX.Value + 85, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 80, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.DrawEllipse(pen, _startPosX.Value + 102, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 97, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.DrawEllipse(pen, _startPosX.Value + 118, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 113, _startPosY.Value +
34, 15, 20); 12, 15, 20);
g.DrawEllipse(pen, _startPosX.Value + 134, _startPosY.Value + g.DrawEllipse(pen, _startPosX.Value + 129, _startPosY.Value +
34, 15, 20); 12, 15, 20);

View File

@ -46,6 +46,15 @@ public class DrawningTrolleybus:DrawningBus
_startPosX += 5;
_startPosY += 22;
base.DrawTransport(g);
_startPosX -= 5;
_startPosY -= 22;
if (trolleybus.Otsek) if (trolleybus.Otsek)
{ {
@ -62,11 +71,7 @@ public class DrawningTrolleybus:DrawningBus
_startPosX += 22;
_startPosY += 15;
base.DrawTransport(g);
_startPosX -= 22;
_startPosY -= 15;
if (trolleybus.Doors) if (trolleybus.Doors)
@ -77,6 +82,23 @@ public class DrawningTrolleybus:DrawningBus
} }
//рога
if (trolleybus.Roga)
{
g.DrawLine(addpen, _startPosX.Value + 42, _startPosY.Value + 7,
_startPosX.Value + 124, _startPosY.Value + 29);
g.DrawLine(addpen, _startPosX.Value + 62, _startPosY.Value + 2,
_startPosX.Value + 124, _startPosY.Value + 29);
}
} }