Class Rectangle
java.lang.Object
org.openpatch.scratch.extensions.shape.Shape
org.openpatch.scratch.extensions.shape.Rectangle
Represents a rectangle shape defined by its position and size.
-
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionRectangle
(double x, double y, double width, double height) Creates a rectangle with the specified position and size. -
Method Summary
-
Constructor Details
-
Rectangle
public Rectangle(double x, double y, double width, double height) Creates a rectangle with the specified position and size.- Parameters:
x
- the x-coordinate of the rectangle's top-left cornery
- the y-coordinate of the rectangle's top-left cornerwidth
- the width of the rectangleheight
- the height of the rectangle
-