waba.fx
Class Rect

java.lang.Object
  |
  +--waba.fx.Rect

public class Rect
extends java.lang.Object

Rect is a rectangle.


Field Summary
 int height
          rectangle height
static int SAME
           
 int width
          rectangle width
 int x
          x position
 int y
          y position
 
Constructor Summary
Rect(int x, int y, int width, int height)
          Constructs a rectangle with the given x, y, width and height.
 
Method Summary
 boolean contains(int xx, int yy)
          returns true if the point xx,yy is inside this rect. added by guich
 Rect modifiedBy(int deltaX, int deltaY, int deltaW, int deltaH)
          returns a new rect modified in the specified parameters. you can use the constant SAME so the value is not modified.
 java.lang.String toString()
          Returns the string representation of the object.
 void translate(int deltaX, int deltaY)
          translates this rect. the new positions will be this.x+xx,this.y+yy.
 
Methods inherited from class java.lang.Object
hashCode
 

Field Detail

x

public int x
x position

y

public int y
y position

width

public int width
rectangle width

height

public int height
rectangle height

SAME

public static final int SAME
Constructor Detail

Rect

public Rect(int x,
            int y,
            int width,
            int height)
Constructs a rectangle with the given x, y, width and height.
Method Detail

contains

public boolean contains(int xx,
                        int yy)
returns true if the point xx,yy is inside this rect. added by guich

toString

public java.lang.String toString()
Description copied from class: java.lang.Object
Returns the string representation of the object.
Overrides:
toString in class java.lang.Object

translate

public void translate(int deltaX,
                      int deltaY)
translates this rect. the new positions will be this.x+xx,this.y+yy.

modifiedBy

public Rect modifiedBy(int deltaX,
                       int deltaY,
                       int deltaW,
                       int deltaH)
returns a new rect modified in the specified parameters. you can use the constant SAME so the value is not modified.