Package com.winnovative_software
Class RectangleFloat
java.lang.Object
com.winnovative_software.RectangleFloat
Represents a rectangle with floating point coordinates
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRectangleFloat
(float x, float y, float width, float height) Constructs a rectangle -
Method Summary
Modifier and TypeMethodDescriptionfloat
height()
Gets the rectangle heightvoid
setHeight
(float height) Sets the rectangle heightvoid
setWidth
(float width) Sets the rectangle widthvoid
setX
(float x) Sets the top left corner X coordinatevoid
setY
(float y) Sets the top left corner Y coordinatefloat
width()
Gets the rectangle widthfloat
x()
Gets the top left corner X coordinatefloat
y()
Gets the top left corner Y coordinate
-
Field Details
-
EMPTY
-
-
Constructor Details
-
RectangleFloat
public RectangleFloat(float x, float y, float width, float height) Constructs a rectangle- Parameters:
x
- top left corner X coordinatey
- top left corner Y coordinatewidth
- rectangle widthheight
- rectangle height
-
-
Method Details
-
x
public float x()Gets the top left corner X coordinate- Returns:
- the top left corner X coordinate
-
setX
public void setX(float x) Sets the top left corner X coordinate- Parameters:
x
- the top left corner X coordinate to set
-
y
public float y()Gets the top left corner Y coordinate- Returns:
- the top left corner Y coordinate
-
setY
public void setY(float y) Sets the top left corner Y coordinate- Parameters:
y
- the top left corner Y coordinate to set
-
width
public float width()Gets the rectangle width- Returns:
- the rectangle width
-
setWidth
public void setWidth(float width) Sets the rectangle width- Parameters:
width
- the rectangle width to set
-
height
public float height()Gets the rectangle height- Returns:
- the rectangle height
-
setHeight
public void setHeight(float height) Sets the rectangle height- Parameters:
height
- the rectangle height to set
-