Package app.media

Class RectangleShape

All Implemented Interfaces:
Serializable

public class RectangleShape extends GenericShape
An implementation of GenericShape representing a rectangle
See Also:
  • Constructor Details

    • RectangleShape

      public RectangleShape(javafx.geometry.Point2D p1, javafx.geometry.Point2D p2, String colour)
      Initializes a rectangle with the following settings
      Parameters:
      p1 - First corner of the rectangle
      p2 - Opposite corner of the rectangle
      colour - The shape's color
  • Method Details

    • toString

      public String toString()
      Returns the shape's type, position, dimensions and color
      Overrides:
      toString in class Media
      Returns:
      the shape's type, position, dimensions and color