Class Rectangle

java.lang.Object
org.openpatch.scratch.extensions.shape.Shape
org.openpatch.scratch.extensions.shape.Rectangle

public class Rectangle extends Shape
Represents a rectangle shape defined by its position and size.
  • 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 corner
      y - the y-coordinate of the rectangle's top-left corner
      width - the width of the rectangle
      height - the height of the rectangle