Class CAAT.Math.Rectangle
				
				
			
				
				
				
					
Defined in:  Rectangle.js.
				
			
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| Field Attributes | Field Name and Description | 
|---|---|
| 
								
								 Rectangle height. 
							 | 
						|
| 
								
								 Rectangle width. 
							 | 
						|
| 
								
								 Rectangle x position. 
							 | 
						|
| 
								
								 Rectangle x1 position. 
							 | 
						|
| 
								
								 Rectangle y position. 
							 | 
						|
| 
								
								 Rectangle y1 position. 
							 | 
						
| Method Attributes | Method Name and Description | 
|---|---|
| <private> | 
								 __init(x, y, w, h)
								 
								
							 | 
						
| 
								 contains(px, py)
								 
								Return whether the coordinate is inside this rectangle. 
							 | 
						|
| 
								 intersect(i, r)
								 
								
							 | 
						|
| 
								 intersects(r)
								 
								
							 | 
						|
| 
								 intersectsRect(x, y, w, h)
								 
								
							 | 
						|
| 
								 isEmpty()
								 
								Return whether this rectangle is empty, that is, has zero dimension. 
							 | 
						|
| 
								 setBounds(x, y, w, h)
								 
								
							 | 
						|
| 
								 setDimension(w, h)
								 
								Set this rectangle's dimension. 
							 | 
						|
| 
								 setEmpty()
								 
								
							 | 
						|
| 
								 setLocation(x, y)
								 
								Set this rectangle's location. 
							 | 
						|
| 
								 union(px, py)
								 
								Set this rectangle as the union of this rectangle and the given point. 
							 | 
						|
| 
								 unionRectangle(rectangle)
								 
								
							 | 
						
					Field Detail
				
				
					 
					
					
					
					height
					
					
					
						Rectangle height.
						
						
					
					
					
						
						
						
						
					
					
					
					width
					
					
					
						Rectangle width.
						
						
					
					
					
						
						
						
						
					
					
					
					x
					
					
					
						Rectangle x position.
						
						
					
					
					
						
						
						
						
					
					
					
					x1
					
					
					
						Rectangle x1 position.
						
						
					
					
					
						
						
						
						
					
					
					
					y
					
					
					
						Rectangle y position.
						
						
					
					
					
						
						
						
						
					
					
					
					y1
					
					
					
						Rectangle y1 position.
						
						
					
					
					
						
						
						
						
					
				
			
		
			
				
					Method Detail
				
				
					 
					<private> 
					
					
					__init(x, y, w, h)
					
					
					- Parameters:
 - x
 - y
 - w
 - h
 
					
					{boolean}
					contains(px, py)
					
					
					
						Return whether the coordinate is inside this rectangle.
						
						
					
					
					
					
						
							- Parameters:
 - px
 - {number}
 - py
 - {number}
 
- Returns:
 - {boolean}
 
					
					
					intersect(i, r)
					
					
					- Parameters:
 - i
 - r
 
					
					
					intersects(r)
					
					
					- Parameters:
 - r
 
					
					
					intersectsRect(x, y, w, h)
					
					
					- Parameters:
 - x
 - y
 - w
 - h
 
					
					{boolean}
					isEmpty()
					
					
					
						Return whether this rectangle is empty, that is, has zero dimension.
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
 - {boolean}
 
					
					
					setBounds(x, y, w, h)
					
					
					- Parameters:
 - x
 - y
 - w
 - h
 
					
					
					setDimension(w, h)
					
					
					
						Set this rectangle's dimension.
						
						
					
					
					
					
						
							- Parameters:
 - w
 - {number}
 - h
 - {number}
 
					
					
					setEmpty()
					
					
					
					
					
					setLocation(x, y)
					
					
					
						Set this rectangle's location.
						
						
					
					
					
					
						
							- Parameters:
 - x
 - {number}
 - y
 - {number}
 
					
					
					union(px, py)
					
					
					
						Set this rectangle as the union of this rectangle and the given point.
						
						
					
					
					
					
						
							- Parameters:
 - px
 - {number}
 - py
 - {number}
 
					
					
					unionRectangle(rectangle)
					
					
					- Parameters:
 - rectangle