AlignUtil

Kind of class:public class
Package:org.casalib.util
Inherits from:none
Version:01/05/09
Author:Aaron Clinger
Classpath:org.casalib.util.AlignUtil
File last modified:Monday, 05 January 2009, 13:20:19
Provides utility functions aligning DisplayObjects.

Summary


Class methods
  • alignLeft (displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void
    • Aligns a DisplayObject to the left side of the bounding Rectangle.
  • alignRight (displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void
    • Aligns a DisplayObject to the right side of the bounding Rectangle.
  • alignTop (displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void
    • Aligns a DisplayObject to the top of the bounding Rectangle.
  • alignBottom (displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void
    • Aligns a DisplayObject to the bottom of the bounding Rectangle.
  • alignCenter (displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void
    • Aligns a DisplayObject to the horizontal center of the bounding Rectangle.
  • alignMiddle (displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void
    • Aligns a DisplayObject to the vertical middle of the bounding Rectangle.
  • alignCenterMiddle (displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void
    • Aligns a DisplayObject to the horizontal center and vertical middle of the bounding Rectangle.

Class methods

alignBottom

public static function alignBottom (
displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void

Aligns a DisplayObject to the bottom of the bounding Rectangle.
Parameters:
displayObject:
The DisplayObject to align.
bounds :
The area in which to align the DisplayObject.
snapToPixel :
Force the position to whole pixels true, or to let the DisplayObject be positioned on sub-pixels false.

alignCenter

public static function alignCenter (
displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void

Aligns a DisplayObject to the horizontal center of the bounding Rectangle.
Parameters:
displayObject:
The DisplayObject to align.
bounds :
The area in which to align the DisplayObject.
snapToPixel :
Force the position to whole pixels true, or to let the DisplayObject be positioned on sub-pixels false.

alignCenterMiddle

public static function alignCenterMiddle (
displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void

Aligns a DisplayObject to the horizontal center and vertical middle of the bounding Rectangle.
Parameters:
displayObject:
The DisplayObject to align.
bounds :
The area in which to align the DisplayObject.
snapToPixel :
Force the position to whole pixels true, or to let the DisplayObject be positioned on sub-pixels false.

alignLeft

public static function alignLeft (
displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void

Aligns a DisplayObject to the left side of the bounding Rectangle.
Parameters:
displayObject:
The DisplayObject to align.
bounds :
The area in which to align the DisplayObject.
snapToPixel :
Force the position to whole pixels true, or to let the DisplayObject be positioned on sub-pixels false.

alignMiddle

public static function alignMiddle (
displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void

Aligns a DisplayObject to the vertical middle of the bounding Rectangle.
Parameters:
displayObject:
The DisplayObject to align.
bounds :
The area in which to align the DisplayObject.
snapToPixel :
Force the position to whole pixels true, or to let the DisplayObject be positioned on sub-pixels false.

alignRight

public static function alignRight (
displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void

Aligns a DisplayObject to the right side of the bounding Rectangle.
Parameters:
displayObject:
The DisplayObject to align.
bounds :
The area in which to align the DisplayObject.
snapToPixel :
Force the position to whole pixels true, or to let the DisplayObject be positioned on sub-pixels false.

alignTop

public static function alignTop (
displayObject:DisplayObject, bounds:Rectangle, snapToPixel:Boolean = true) : void

Aligns a DisplayObject to the top of the bounding Rectangle.
Parameters:
displayObject:
The DisplayObject to align.
bounds :
The area in which to align the DisplayObject.
snapToPixel :
Force the position to whole pixels true, or to let the DisplayObject be positioned on sub-pixels false.