Class GUI.Rectangle

java.lang.Object
it.polimi.ingsw.client.new_gui.GUI.Rectangle
Enclosing class:
GUI

public static class GUI.Rectangle extends Object
  • Field Details

    • relX

      public final double relX
    • relY

      public final double relY
    • relW

      public final double relW
    • relH

      public final double relH
  • Constructor Details

    • Rectangle

      public Rectangle(double relX, double relY, double relW, double relH)
  • Method Details

    • contains

      public boolean contains(double absX, double absY)
    • sameToTheRight

      public GUI.Rectangle sameToTheRight()
    • getX

      public int getX(double xPercentage)
      Parameters:
      xPercentage - x-position relative to the rectangle
      Returns:
      absolute x-position
    • getY

      public int getY(double yPercentage)
      Parameters:
      yPercentage - y-position relative to the rectangle
      Returns:
      absolute y-position
    • relativeToThis

      public GUI.Rectangle relativeToThis(double _relX, double _relY, double _relW, double _relH)
      Returns:
      a rectangle with coordinates expressed in a system relative to this rectangle
    • squareFromWidthRelativeToThis

      public GUI.Rectangle squareFromWidthRelativeToThis(double _relX, double _relY, double _relW)
    • squareFromHeightRelativeToThis

      public GUI.Rectangle squareFromHeightRelativeToThis(double _relX, double _relY, double _relH)
    • fitImageViewToThis

      public void fitImageViewToThis(javafx.scene.image.ImageView imgView)
    • toJavaFXRect

      public javafx.scene.shape.Rectangle toJavaFXRect()
    • toString

      public String toString()
      Overrides:
      toString in class Object