PIbd21.LyovushkinaA.A.Conta.../ObjectParameters.java

33 lines
783 B
Java
Raw Permalink Normal View History

2023-10-09 23:11:13 +04:00
public class ObjectParameters {
private int _x;
private int _y;
private int _width;
private int _height;
public int LeftBorder;
public int TopBorder;
public int RightBorder;
public int DownBorder;
public int ObjectMiddleHorizontal;
public int ObjectMiddleVertical;
public ObjectParameters(int x, int y, int width, int height)
{
_x = x;
_y = y;
_width = width;
_height = height;
LeftBorder = _x;
TopBorder = _y;
RightBorder = _x + _width;
DownBorder = _y + _height;
ObjectMiddleHorizontal = _x + _width / 2;
ObjectMiddleVertical = _y + _height / 2;
}
}