com.steema.teechart
Class Rectangle

java.lang.Object
  extended by com.steema.teechart.Rectangle
All Implemented Interfaces:
java.io.Serializable

public final class Rectangle
extends java.lang.Object
implements java.io.Serializable

Title: Rectangle class

Description:

Copyright (c) 2005-2008 by Steema Software SL. All Rights Reserved.

Company: Steema Software SL

See Also:
Serialized Form

Field Summary
static Rectangle EMPTY
           
 int height
           
 int width
           
 int x
           
 int y
           
 
Constructor Summary
Rectangle()
           
Rectangle(int ax, int ay, int awidth, int aheight)
           
Rectangle(Point location, Dimension size)
           
Rectangle(Rectangle r)
           
 
Method Summary
 void add(Rectangle r)
           
 Point center()
          Returns the center point of the rectangle
 boolean contains(int x2, int y2)
           
 boolean contains(Point pos)
           
 Rectangle copy()
           
static Rectangle fromLTRB(int x, int y, int right, int bottom)
           
 int getBottom()
          Gets rectangle Bottom coordinate.
 double getHeight()
           
 int getLeft()
          Gets rectangle Left coordinate.
 Point getLocation()
           
 int getRight()
          Gets rectangle Right coordinate.
 int getTop()
          Gets rectangle Top coordinate.
 double getWidth()
           
 void grow(int i, int j)
           
 void inflate(int horizontal, int vertical)
           
 void intersect(Rectangle value)
           
static void intersect(Rectangle r1, Rectangle r2, Rectangle dest)
           
 boolean intersects(Rectangle r)
           
 boolean isEmpty()
           
 void offset(int w, int h)
           
 void setBottom(int value)
          Sets rectangle Bottom coordinate.
 void setLeft(int value)
          Sets rectangle Left coordinate.
 void setRight(int value)
          Sets rectangle Right coordinate.
 void setTop(int value)
          Sets rectangle Top coordinate.
 void union(Rectangle r)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTY

public static final Rectangle EMPTY

x

public int x

y

public int y

width

public int width

height

public int height
Constructor Detail

Rectangle

public Rectangle(Point location,
                 Dimension size)

Rectangle

public Rectangle()

Rectangle

public Rectangle(int ax,
                 int ay,
                 int awidth,
                 int aheight)

Rectangle

public Rectangle(Rectangle r)
Method Detail

center

public Point center()
Returns the center point of the rectangle

Returns:

copy

public Rectangle copy()

getLeft

public int getLeft()
Gets rectangle Left coordinate.

Returns:
int

setLeft

public void setLeft(int value)
Sets rectangle Left coordinate.


getRight

public int getRight()
Gets rectangle Right coordinate.

Returns:
int

setRight

public void setRight(int value)
Sets rectangle Right coordinate.


getTop

public int getTop()
Gets rectangle Top coordinate.

Returns:
int

setTop

public void setTop(int value)
Sets rectangle Top coordinate.


getBottom

public int getBottom()
Gets rectangle Bottom coordinate.

Returns:
int

setBottom

public void setBottom(int value)
Sets rectangle Bottom coordinate.


fromLTRB

public static Rectangle fromLTRB(int x,
                                 int y,
                                 int right,
                                 int bottom)

inflate

public void inflate(int horizontal,
                    int vertical)

intersect

public void intersect(Rectangle value)

offset

public void offset(int w,
                   int h)
Parameters:
w -
h -

getLocation

public Point getLocation()

grow

public void grow(int i,
                 int j)

contains

public boolean contains(int x2,
                        int y2)

contains

public boolean contains(Point pos)

add

public void add(Rectangle r)

union

public void union(Rectangle r)

getWidth

public double getWidth()

getHeight

public double getHeight()

intersect

public static void intersect(Rectangle r1,
                             Rectangle r2,
                             Rectangle dest)

isEmpty

public boolean isEmpty()

intersects

public boolean intersects(Rectangle r)