Лабораторная работа №2

This commit is contained in:
Олег Кудринский 2024-06-08 13:37:51 +04:00
parent 52c006a00a
commit a0c597a084

View File

@ -22,14 +22,14 @@ public class DrawingContainerShip extends DrawingShip {
int craneX = _StartPosX + drawingShipWidth - 40;
int craneY = _StartPosY + drawingShipHeight - 90;
//Кран
g.setColor(Color.BLACK);
g.drawLine(craneX + 10, craneY + 40, craneX + 10, craneY);
g.drawLine(craneX + 10, craneY, craneX + 50, craneY);
g.drawLine(craneX + 10, craneY, craneX + 50, craneY + 5);
g.drawLine(craneX + 50, craneY, craneX + 50, craneY + 30);
//Хваталка крана
g.drawLine(craneX + 40, craneY + 30, craneX + 60, craneY + 30);
g.drawLine(craneX + 40, craneY + 30, craneX + 40, craneY + 35);
g.drawLine(craneX + 60, craneY + 30, craneX + 60, craneY + 35);
@ -65,7 +65,7 @@ public class DrawingContainerShip extends DrawingShip {
}
if (containerShip.Container) {
// Draw containers
//Контейнер
g.setColor(Color.BLACK);
g.drawRect(_StartPosX + 40, containerY, 40, 15);
g.setColor(containerShip.getAdditionalColor());