Готовая Лабораторная 4

This commit is contained in:
Никита Белянин 2023-11-13 00:21:09 +04:00
parent 729aeaaed7
commit 0667fc1a0a

View File

@ -117,10 +117,11 @@ public class DrawingArmoVehicle {
return; return;
} }
// body
g.setColor(ArmoVehicle.BodyColor); g.setColor(ArmoVehicle.BodyColor);
int[] xPoints = {_startPosX + 5, _startPosX + 140, _startPosX + 130, _startPosX + 12}; int[] xPoints = {_startPosX + 5, _startPosX + 140, _startPosX + 130, _startPosX + 12};
int[] yPoints = {_startPosY + 30, _startPosY + 30, _startPosY + 42, _startPosY + 42}; int[] yPoints = {_startPosY + 30, _startPosY + 30, _startPosY + 42, _startPosY + 42};
int nPoints = 4; int nPoints = xPoints.length;
g.drawPolygon(xPoints, yPoints, nPoints); g.drawPolygon(xPoints, yPoints, nPoints);
g.fillPolygon(xPoints, yPoints, nPoints); g.fillPolygon(xPoints, yPoints, nPoints);