Масштабированная отрисовка

This commit is contained in:
Itos 2023-11-28 13:14:07 +04:00
parent e483224393
commit 3610d6f7fa

View File

@ -109,14 +109,14 @@ namespace GasolineTanker
if (EntityGasolineTanker.Tank) if (EntityGasolineTanker.Tank)
{ {
//Цистерна //Цистерна
g.FillEllipse(additionalBrush, _startPosX + _gasolineTankerWidth / 20 * 3, _startPosY + _gasolineTankerHeight / 10 * 2, _gasolineTankerWidth / 20 * 4, _gasolineTankerHeight / 10 * 4); g.FillEllipse(additionalBrush, _startPosX + _gasolineTankerWidth / 20 * 0, _startPosY + _gasolineTankerHeight / 10 * 1, _gasolineTankerWidth / 20 * 5, _gasolineTankerHeight / 10 * 5);
g.FillEllipse(additionalBrush, _startPosX + _gasolineTankerWidth / 20 * 9, _startPosY + _gasolineTankerHeight / 10 * 2, _gasolineTankerWidth / 20 * 4, _gasolineTankerHeight / 10 * 4); g.FillEllipse(additionalBrush, _startPosX + _gasolineTankerWidth / 20 * 7, _startPosY + _gasolineTankerHeight / 10 * 1, _gasolineTankerWidth / 20 * 5, _gasolineTankerHeight / 10 * 5);
Point[] pointsTunk = Point[] pointsTunk =
{ {
new Point(_startPosX + _gasolineTankerWidth / 20 * 5, _startPosY + _gasolineTankerHeight / 10 * 2), new Point(_startPosX + _gasolineTankerWidth / 20 * 2, _startPosY + _gasolineTankerHeight / 10 * 1),
new Point(_startPosX + _gasolineTankerWidth / 20 * 11, _startPosY + _gasolineTankerHeight / 10 * 2), new Point(_startPosX + _gasolineTankerWidth / 20 * 9, _startPosY + _gasolineTankerHeight / 10 * 1),
new Point(_startPosX + _gasolineTankerWidth / 20 * 11, _startPosY + _gasolineTankerHeight / 10 * 6), new Point(_startPosX + _gasolineTankerWidth / 20 * 9, _startPosY + _gasolineTankerHeight / 10 * 6),
new Point(_startPosX + _gasolineTankerWidth / 20 * 5, _startPosY + _gasolineTankerHeight / 10 * 6), new Point(_startPosX + _gasolineTankerWidth / 20 * 2, _startPosY + _gasolineTankerHeight / 10 * 6),
}; };
g.FillPolygon(additionalBrush, pointsTunk); g.FillPolygon(additionalBrush, pointsTunk);
} }
@ -125,10 +125,10 @@ namespace GasolineTanker
//Маячок //Маячок
Point[] pointsBeacon = Point[] pointsBeacon =
{ {
new Point(_startPosX + _gasolineTankerWidth / 20 * 14, _startPosY + _gasolineTankerHeight / 10 * 2), new Point(_startPosX + _gasolineTankerWidth / 20 * 13, _startPosY + _gasolineTankerHeight / 10 * 1),
new Point(_startPosX + _gasolineTankerWidth / 20 * 13, _startPosY + _gasolineTankerHeight / 10 * 0),
new Point(_startPosX + _gasolineTankerWidth / 20 * 14, _startPosY + _gasolineTankerHeight / 10 * 0),
new Point(_startPosX + _gasolineTankerWidth / 20 * 14, _startPosY + _gasolineTankerHeight / 10 * 1), new Point(_startPosX + _gasolineTankerWidth / 20 * 14, _startPosY + _gasolineTankerHeight / 10 * 1),
new Point(_startPosX + _gasolineTankerWidth / 20 * 15, _startPosY + _gasolineTankerHeight / 10 * 1),
new Point(_startPosX + _gasolineTankerWidth / 20 * 15, _startPosY + _gasolineTankerHeight / 10 * 2),
}; };
g.FillPolygon(additionalBrush, pointsBeacon); g.FillPolygon(additionalBrush, pointsBeacon);
//g.DrawPolygon(pen, pointsBeacon); //g.DrawPolygon(pen, pointsBeacon);
@ -143,20 +143,21 @@ namespace GasolineTanker
g.DrawPolygon(pen, pointsBorder); g.DrawPolygon(pen, pointsBorder);
*/ */
Point[] pointsFrame = { Point[] pointsFrame = {
new Point(_startPosX + _gasolineTankerWidth / 20 * 2, _startPosY + _gasolineTankerHeight / 10 * 6), new Point(_startPosX + _gasolineTankerWidth / 20 * 0, _startPosY + _gasolineTankerHeight / 10 * 6),
new Point(_startPosX + _gasolineTankerWidth / 20 * 13, _startPosY + _gasolineTankerHeight / 10 * 6), new Point(_startPosX + _gasolineTankerWidth / 20 * 12, _startPosY + _gasolineTankerHeight / 10 * 6),
new Point(_startPosX + _gasolineTankerWidth / 20 * 13, _startPosY + _gasolineTankerHeight / 10 * 2), new Point(_startPosX + _gasolineTankerWidth / 20 * 12, _startPosY + _gasolineTankerHeight / 10 * 1),
new Point(_startPosX + _gasolineTankerWidth / 20 * 16, _startPosY + _gasolineTankerHeight / 10 * 2), new Point(_startPosX + _gasolineTankerWidth / 20 * 15, _startPosY + _gasolineTankerHeight / 10 * 1),
new Point(_startPosX + _gasolineTankerWidth / 20 * 18, _startPosY + _gasolineTankerHeight / 10 * 5), new Point(_startPosX + _gasolineTankerWidth / 20 * 16, _startPosY + _gasolineTankerHeight / 10 * 4),
new Point(_startPosX + _gasolineTankerWidth / 20 * 18, _startPosY + _gasolineTankerHeight / 10 * 7), new Point(_startPosX + _gasolineTankerWidth / 20 * 20, _startPosY + _gasolineTankerHeight / 10 * 5),
new Point(_startPosX + _gasolineTankerWidth / 20 * 2, _startPosY + _gasolineTankerHeight / 10 * 7),}; new Point(_startPosX + _gasolineTankerWidth / 20 * 20, _startPosY + _gasolineTankerHeight / 10 * 8),
new Point(_startPosX + _gasolineTankerWidth / 20 * 0, _startPosY + _gasolineTankerHeight / 10 * 8),};
g.FillPolygon(bodyBrush, pointsFrame); g.FillPolygon(bodyBrush, pointsFrame);
g.DrawPolygon(pen, pointsFrame); g.DrawPolygon(pen, pointsFrame);
//Колёса //Колёса
g.FillEllipse(wheelBrush, _startPosX + _gasolineTankerWidth / 20 * 3, _startPosY + _gasolineTankerHeight / 10 * 7, _gasolineTankerWidth / 20 * 2, _gasolineTankerHeight / 10 * 2); g.FillEllipse(wheelBrush, _startPosX + _gasolineTankerWidth / 20 * 1, _startPosY + _gasolineTankerHeight / 10 * 7, _gasolineTankerWidth / 20 * 3, _gasolineTankerHeight / 10 * 3);
g.FillEllipse(wheelBrush, _startPosX + _gasolineTankerWidth / 20 * 5, _startPosY + _gasolineTankerHeight / 10 * 7, _gasolineTankerWidth / 20 * 2, _gasolineTankerHeight / 10 * 2); g.FillEllipse(wheelBrush, _startPosX + _gasolineTankerWidth / 20 * 5, _startPosY + _gasolineTankerHeight / 10 * 7, _gasolineTankerWidth / 20 * 3, _gasolineTankerHeight / 10 * 3);
g.FillEllipse(wheelBrush, _startPosX + _gasolineTankerWidth / 20 * 15, _startPosY + _gasolineTankerHeight / 10 * 7, _gasolineTankerWidth / 20 * 2, _gasolineTankerHeight / 10 * 2); g.FillEllipse(wheelBrush, _startPosX + _gasolineTankerWidth / 20 * 16, _startPosY + _gasolineTankerHeight / 10 * 7, _gasolineTankerWidth / 20 * 3, _gasolineTankerHeight / 10 * 3);
} }
} }
} }