Готовая лабораторная работа 5
This commit is contained in:
parent
95ba108e2c
commit
1f88f2883e
@ -30,7 +30,7 @@ public class DrawingStarOrnament implements IOrnamentForm {
|
|||||||
public void CaterpillarStar(Graphics g, int _startPosX, int _startPosY) {
|
public void CaterpillarStar(Graphics g, int _startPosX, int _startPosY) {
|
||||||
StarColor = Color.RED;
|
StarColor = Color.RED;
|
||||||
g.setColor(StarColor);
|
g.setColor(StarColor);
|
||||||
int xPontsStar[] = {_startPosX + 15, _startPosX + 18, _startPosX + 21, _startPosX + 18, _startPosX + 19, _startPosX + 16, _startPosX + 12, _startPosX + 13, _startPosX + 12, _startPosX + 15, _startPosX + 16};
|
int xPontsStar[] = {_startPosX + 15, _startPosX + 18, _startPosX + 21, _startPosX + 18, _startPosX + 19, _startPosX + 16, _startPosX + 12, _startPosX + 12, _startPosX + 11, _startPosX + 15, _startPosX + 16};
|
||||||
int yPontsStar[] = {_startPosY + 35, _startPosY + 38, _startPosY + 38, _startPosY + 42, _startPosY + 45, _startPosY + 42, _startPosY + 45, _startPosY + 41, _startPosY + 38, _startPosY + 38, _startPosY + 35};
|
int yPontsStar[] = {_startPosY + 35, _startPosY + 38, _startPosY + 38, _startPosY + 42, _startPosY + 45, _startPosY + 42, _startPosY + 45, _startPosY + 41, _startPosY + 38, _startPosY + 38, _startPosY + 35};
|
||||||
g.drawPolygon(xPontsStar, yPontsStar, xPontsStar.length);
|
g.drawPolygon(xPontsStar, yPontsStar, xPontsStar.length);
|
||||||
g.fillPolygon(xPontsStar, yPontsStar, xPontsStar.length);
|
g.fillPolygon(xPontsStar, yPontsStar, xPontsStar.length);
|
||||||
|
Loading…
Reference in New Issue
Block a user