package starling.textures {
import openfl.geom.Rectangle;
/**
 *  A SubTexture represents a section of another texture. This is achieved solely by
 *  *  manipulation of texture coordinates, making the class very efficient. 
 *  *
 *  *  <p><em>Note that it is OK to create subtextures of subtextures.</em></p>
 *  
 * @externs
 */
public class SubTexture extends starling.textures.Texture {
	/**
	 *  Creates a new SubTexture containing the specified region of a parent texture.
	 *      *
	 *      *  @param parent     The texture you want to create a SubTexture from.
	 *      *  @param region     The region of the parent texture that the SubTexture will show
	 *      *                    (in points). If <code>null</code>, the complete area of the parent.
	 *      *  @param ownsParent If <code>true</code>, the parent texture will be disposed
	 *      *                    automatically when the SubTexture is disposed.
	 *      *  @param frame      If the texture was trimmed, the frame rectangle can be used to restore
	 *      *                    the trimmed area.
	 *      *  @param rotated    If true, the SubTexture will show the parent region rotated by
	 *      *                    90 degrees (CCW).
	 *      *  @param scaleModifier  The scale factor of the SubTexture will be calculated by
	 *      *                    multiplying the parent texture's scale factor with this value.
	 *      
	 */
	public function SubTexture(parent:starling.textures.Texture, region:openfl.geom.Rectangle = undefined, ownsParent:Boolean = undefined, frame:openfl.geom.Rectangle = undefined, rotated:Boolean = undefined, scaleModifier:Number = undefined) {
		super();
	}
	/**
	 *  Disposes the parent texture if this texture owns it. 
	 */
	override public function dispose():void {}
	/**
	 *  The texture which the SubTexture is based on. 
	 */
	public function get parent():starling.textures.Texture { return null; }
	/**
	 *  Indicates if the parent texture is disposed when this object is disposed. 
	 */
	public function get ownsParent():Boolean { return false; }
	/**
	 *  If true, the SubTexture will show the parent region rotated by 90 degrees (CCW). 
	 */
	public function get rotated():Boolean { return false; }
	/**
	 *  The region of the parent texture that the SubTexture is showing (in points).
	 *      *
	 *      *  <p>CAUTION: not a copy, but the actual object! Do not modify!</p> 
	 */
	public function get region():openfl.geom.Rectangle { return null; }
}
}
