Class Rectangle.Mutable

java.lang.Object
codechicken.lib.gui.modular.lib.geometry.Rectangle.Mutable
All Implemented Interfaces:
Rectangle
Enclosing interface:
Rectangle

public static class Rectangle.Mutable extends Object implements Rectangle
  • Constructor Details

  • Method Details

    • pos

      public Position pos()
      Specified by:
      pos in interface Rectangle
    • width

      public double width()
      Specified by:
      width in interface Rectangle
    • height

      public double height()
      Specified by:
      height in interface Rectangle
    • offsetPos

      public Rectangle offsetPos(double xAmount, double yAmount)
      Description copied from interface: Rectangle
      Returns a new rectangle with this operation applied
      Specified by:
      offsetPos in interface Rectangle
    • setPos

      public Rectangle setPos(double newX, double newY)
      Description copied from interface: Rectangle
      Returns a new rectangle with this operation applied
      Specified by:
      setPos in interface Rectangle
    • setSize

      public Rectangle setSize(double width, double height)
      Description copied from interface: Rectangle
      Returns a new rectangle with this operation applied
      Specified by:
      setSize in interface Rectangle
    • offsetSize

      public Rectangle offsetSize(double xAmount, double yAmount)
      Description copied from interface: Rectangle
      Returns a new rectangle with this operation applied
      Specified by:
      offsetSize in interface Rectangle
    • intersect

      public Rectangle intersect(Rectangle other)
      Description copied from interface: Rectangle
      Returns a new rectangle that represents the intersection area between the two inputs
      Specified by:
      intersect in interface Rectangle
    • set

      public void set(Rectangle rectangle)
    • combine

      public Rectangle combine(Rectangle... combineWith)
      Description copied from interface: Rectangle
      Returns a new rectangle, the bounds of which enclose all the input rectangles.
      Specified by:
      combine in interface Rectangle
      Parameters:
      combineWith - Rectangles to combine with the start rectangle
    • immutable

      public Rectangle.Immutable immutable()