Исправлена отрисовка объекта
This commit is contained in:
parent
747b5c1c87
commit
96477035a8
@ -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);
|
||||
|
Loading…
Reference in New Issue
Block a user