package starling.utils {
import openfl.geom.Vector3D;
import openfl.geom.Rectangle;
import openfl.geom.Matrix3D;
import openfl.geom.Matrix;
import openfl.Vector;
/**
 *  A utility class containing methods related to the Rectangle class. 
 * @externs
 */
public class RectangleUtil {
	/**
	 *  Calculates the intersection between two Rectangles. If the rectangles do not intersect,
	 *      *  this method returns an empty Rectangle object with its properties set to 0. 
	 */
	public static function intersect(rect1:openfl.geom.Rectangle, rect2:openfl.geom.Rectangle, out:openfl.geom.Rectangle = undefined):openfl.geom.Rectangle { return null; }
	/**
	 *  Calculates a rectangle with the same aspect ratio as the given 'rectangle',
	 *      *  centered within 'into'.  
	 *      * 
	 *      *  <p>This method is useful for calculating the optimal viewPort for a certain display 
	 *      *  size. You can use different scale modes to specify how the result should be calculated;
	 *      *  furthermore, you can avoid pixel alignment errors by only allowing whole-number  
	 *      *  multipliers/divisors (e.g. 3, 2, 1, 1/2, 1/3).</p>
	 *      *  
	 *      *  @see starling.utils.ScaleMode
	 *      
	 */
	public static function fit(rectangle:openfl.geom.Rectangle, into:openfl.geom.Rectangle, scaleMode:String = undefined, pixelPerfect:Boolean = undefined, out:openfl.geom.Rectangle = undefined):openfl.geom.Rectangle { return null; }
	/**
	 *  If the rectangle contains negative values for width or height, all coordinates
	 *      *  are adjusted so that the rectangle describes the same region with positive values. 
	 */
	public static function normalize(rect:openfl.geom.Rectangle):void {}
	/**
	 *  Extends the rectangle in all four directions. 
	 */
	public static function extend(rect:openfl.geom.Rectangle, left:Number = undefined, right:Number = undefined, top:Number = undefined, bottom:Number = undefined):void {}
	/**
	 *  Extends the rectangle in all four directions so that it is exactly on pixel bounds. 
	 */
	public static function extendToWholePixels(rect:openfl.geom.Rectangle, scaleFactor:Number = undefined):void {}
	/**
	 *  Calculates the bounds of a rectangle after transforming it by a matrix.
	 *      *  If you pass an <code>out</code>-rectangle, the result will be stored in this rectangle
	 *      *  instead of creating a new object. 
	 */
	public static function getBounds(rectangle:openfl.geom.Rectangle, matrix:openfl.geom.Matrix, out:openfl.geom.Rectangle = undefined):openfl.geom.Rectangle { return null; }
	/**
	 *  Calculates the bounds of a rectangle projected into the XY-plane of a certain 3D space
	 *      *  as they appear from the given camera position. Note that 'camPos' is expected in the
	 *      *  target coordinate system (the same that the XY-plane lies in).
	 *      *
	 *      *  <p>If you pass an 'out' Rectangle, the result will be stored in this rectangle
	 *      *  instead of creating a new object.</p> 
	 */
	public static function getBoundsProjected(rectangle:openfl.geom.Rectangle, matrix:openfl.geom.Matrix3D, camPos:openfl.geom.Vector3D, out:openfl.geom.Rectangle = undefined):openfl.geom.Rectangle { return null; }
	/**
	 *  Returns a vector containing the positions of the four edges of the given rectangle. 
	 */
	public static function getPositions(rectangle:openfl.geom.Rectangle, out:openfl.Vector = undefined):openfl.Vector { return null; }
	/**
	 *  Compares all properties of the given rectangle, returning true only if
	 *      *  they are equal (with the given accuracy 'e'). 
	 */
	public static function compare(r1:openfl.geom.Rectangle, r2:openfl.geom.Rectangle, e:Number = undefined):Boolean { return false; }
}
}
