Class dnx.geom.Rectangle2
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class dnx.geom.Rectangle2

java.lang.Object
   |
   +----dnx.geom.Rectangle2

public class Rectangle2
extends Object
implements Cloneable, Copyable
Rectangle in 2 dimensions.

Variable Index

 o height
 o width
 o x
 o y

Constructor Index

 o Rectangle2()
 o Rectangle2(float, float)
 o Rectangle2(float, float, float, float)
 o Rectangle2(Point2, Dimension2)
 o Rectangle2(Rectangle2)

Method Index

 o clear()
 o clone()
 o copy(Copyable)
 o draw(Graphics2)
 o inside(float, float)
Return whether a point is inside the rectangle.
 o inside(Point2)
 o reshape(float, float, float, float)

Variables

 o height
  public float height
 o width
  public float width
 o x
  public float x
 o y
  public float y

Constructors

 o Rectangle2
  public Rectangle2()
 o Rectangle2
  public Rectangle2(float x,
                    float y,
                    float width,
                    float height)
 o Rectangle2
  public Rectangle2(float width,
                    float height)
 o Rectangle2
  public Rectangle2(Point2 p,
                    Dimension2 d)
 o Rectangle2
  public Rectangle2(Rectangle2 r)

Methods

 o clear
  public void clear()
 o reshape
  public void reshape(float x,
                      float y,
                      float width,
                      float height)
 o inside
  public boolean inside(float x,
                        float y)
Return whether a point is inside the rectangle. Note that this definition is *NOT* exactly compatible with the AWT, which only includes points on the top and left boundaries (but not the bottom and right ones) in the rectangle. This asymmetry makes some things easier (esp. with int coordinates) but really messes things up mathematically.
 o inside
  public boolean inside(Point2 p)
 o draw
  public void draw(Graphics2 g)
 o copy
  public void copy(Copyable cop)
 o clone
  public Object clone()
Overrides:
clone in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index