Malin D.V. Lab work 1 #1

Merged
eegov merged 2 commits from LabWork_01 into master 2022-09-30 10:11:19 +04:00
Showing only changes of commit 96477035a8 - Show all commits

View File

@ -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);