Name

Class Rect — Toolkit independent Rectangle class.

Synopsis

 public final class com.­froglogic.­squish.­extension.­Rect {

// Public Fields  public int height ;

  public int width ;

  public int ;

  public int ;

// Public Constructors  public Rect();

  public Rect(int x,

              int y,

              int width,

              int height);


// Public Methods  public boolean contains(com.­froglogic.­squish.­extension.­Point p);

  public boolean equals(java.­lang.­Object obj);

  public com.​­froglogic.​­squish.​­extension.​­Rect intersect(com.­froglogic.­squish.­extension.­Rect r);

  public boolean isEmpty();

  public boolean isValid();

  public java.​­lang.​­String toString();

}

Methods inherited from java.lang.Object: clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait

Description

Toolkit independent Rectangle class.

Constructors

Rect()

public Rect();

Construct a rectangle with zero width and height at left-top position (0, 0).

Rect(int, int, int, int)

public Rect(int x,

            int y,

            int width,

            int height);

Parameters

x

x position of the rectangle

y

y position of the rectangle

width

the width of the rectangle

height

the width of the rectangle

Construct a rectangle at left-top position x, y, with given width and height.