Class Annotations.Rect
Represents a utility class used to manipulate rectangle objects. (x1,y1)------| | | |------(x2,y2)
| Constructor Attributes | Constructor Name and Description | 
|---|---|
| 
								Annotations.Rect(x1, y1, x2, y2)
							 Create a new Rect with the x and y coordinates of the upper-left and lower right points. | 
| Method Attributes | Method Name and Description | 
|---|---|
| Normalizes the rect to ensure point (x1, y1) is the bottom left point as expected by xfdf output | |
| fitTo(rect)
								 Best fit this rect into another larger rect | |
| Gets the height of the rect | |
| getWidth()
								 Gets the width of the rect | |
| Normalizes the rect to ensure point (x1, y1) is the upper left point and width and height are non-negative. | |
| translate(x, y)
								 Translates the rect | 
					Class Detail
				
				
				
						Annotations.Rect(x1, y1, x2, y2)
				
				
				
					Create a new Rect with the x and y coordinates of the upper-left and lower right points.
					
				
				
				
				
				
					
						- Parameters:
- {number} x1
- the x coordinate of the upper-left point
- {number} y1
- the y coordinate of the upper-left point
- {number} x2
- the x coordinate of the lower-right point
- {number} y2
- the y coordinate of the lower-right point
					Method Detail
				
				
					 
					
					
					
					exportNormalize()
					
					
					
						Normalizes the rect to ensure point (x1, y1) is the bottom left point as expected by xfdf output
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					
					fitTo(rect)
					
					
					
						Best fit this rect into another larger rect
						
						
					
					
					
					
						
							- Parameters:
- {Annotations.Rect} rect
					
					{number}
					getHeight()
					
					
					
						Gets the height of the rect
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
- {number} The height of the rect
					
					{number}
					getWidth()
					
					
					
						Gets the width of the rect
						
						
					
					
					
					
						
						
						
						
						
							- Returns:
- {number} The width of the rect
					
					
					normalize()
					
					
					
						Normalizes the rect to ensure point (x1, y1) is the upper left point and width and height are non-negative.
						
						
					
					
					
					
						
						
						
						
						
						
						
					
					
					
					translate(x, y)
					
					
					
						Translates the rect
						
						
					
					
					
					
						
							- Parameters:
- {number} x
- The amount to translate in the x direction
- {number} y
- The amount to translate in the y direction
