Package org.openpatch.scratch
Class Rectangle
java.lang.Object
org.openpatch.scratch.Shape
org.openpatch.scratch.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
Methods inherited from class org.openpatch.scratch.Shape
contains, draw, getBounds, intersects, invalidateCache, rotate, scale, translate
-
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
-