PIbd-21 Belianin N.N. LabWork05 Hard #6

Closed
Belnik wants to merge 12 commits from LabWork05 into LabWork04
Showing only changes of commit 767f265a61 - Show all commits

View File

@ -36,6 +36,12 @@ public class DrawingWheelsCombination implements IOrnamentForm {
g.fillPolygon(xPontsStar, yPontsStar, xPontsStar.length);
}
public void DrawSuspension(Graphics g, int _startPosX, int _startPosY) {
CombinationColor = Color.BLUE;
g.setColor(CombinationColor);
g.fillRect(_startPosX + 27, _startPosY + 50, 10, 3);
}
public void DrawWheels(Graphics g, int _startPosX, int _startPosY) {
g.setColor(Color.BLACK);
g.fillOval(10 + _startPosX, 42 + _startPosY, 20, 20);
@ -43,15 +49,15 @@ public class DrawingWheelsCombination implements IOrnamentForm {
public void Draw(Graphics g, int _startPosX, int _startPosY) {
DrawWheels(g,_startPosX, _startPosY);
g.fillRect(_startPosX + 27, _startPosY + 50, 10, 3);
DrawSuspension(g, _startPosX, _startPosY);
CaterpillarStar(g,_startPosX + 5, _startPosY + 12);
if (wheels == CountWheels.Two){
DrawWheels(g,_startPosX, _startPosY);
DrawWheels(g,_startPosX + 100, _startPosY);
g.fillRect(_startPosX + 27, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 101, _startPosY + 50, 10, 3);
DrawSuspension(g, _startPosX, _startPosY);
DrawSuspension(g,_startPosX + 73, _startPosY);
CaterpillarStar(g,_startPosX + 5, _startPosY + 12);
CaterpillarStar(g,_startPosX + 105, _startPosY + 12);
@ -62,9 +68,9 @@ public class DrawingWheelsCombination implements IOrnamentForm {
DrawWheels(g,_startPosX + 50, _startPosY);
DrawWheels(g,_startPosX + 100, _startPosY);
g.fillRect(_startPosX + 27, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 51, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 100, _startPosY + 50, 10, 3);
DrawSuspension(g, _startPosX, _startPosY);
DrawSuspension(g,_startPosX + 24, _startPosY);
DrawSuspension(g,_startPosX + 73, _startPosY);
CaterpillarStar(g,_startPosX + 5, _startPosY + 12);
@ -78,10 +84,10 @@ public class DrawingWheelsCombination implements IOrnamentForm {
DrawWheels(g,_startPosX + 50, _startPosY);
DrawWheels(g,_startPosX + 100, _startPosY);
g.fillRect(_startPosX + 27, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 51, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 80, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 101, _startPosY + 50, 10, 3);
DrawSuspension(g, _startPosX, _startPosY);
DrawSuspension(g,_startPosX + 24, _startPosY);
DrawSuspension(g,_startPosX + 53, _startPosY);
DrawSuspension(g,_startPosX + 73, _startPosY);
CaterpillarStar(g,_startPosX + 5, _startPosY + 12);
CaterpillarStar(g,_startPosX + 30, _startPosY + 12);
@ -96,10 +102,10 @@ public class DrawingWheelsCombination implements IOrnamentForm {
DrawWheels(g,_startPosX + 75, _startPosY);
DrawWheels(g,_startPosX + 100, _startPosY);
g.fillRect(_startPosX + 27, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 51, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 80, _startPosY + 50, 10, 3);
g.fillRect(_startPosX + 101, _startPosY + 50, 10, 3);
DrawSuspension(g, _startPosX, _startPosY);
DrawSuspension(g,_startPosX + 24, _startPosY);
DrawSuspension(g,_startPosX + 53, _startPosY);
DrawSuspension(g,_startPosX + 73, _startPosY);
CaterpillarStar(g,_startPosX + 5, _startPosY + 12);
CaterpillarStar(g,_startPosX + 30, _startPosY + 12);