Packagecom.pblabs.rendering2D
Classpublic final class SceneAlignment
InheritanceSceneAlignment Inheritance Enumerable Inheritance Object
Implements ISerializable

Helper class for controlling alignment of scene relative to its position.



Public Properties
 PropertyDefined By
  defaultType : Enumerable
[override] [read-only] This must be implemented by subclasses.
SceneAlignment
  typeMap : Dictionary
[override] [read-only] This must be implemented by subclasses.
SceneAlignment
Public Methods
 MethodDefined By
  
calculate(outPoint:Point, alignment:SceneAlignment, sceneWidth:int, sceneHeight:int):void
[static] Given an alignment constant from this class, calculate
SceneAlignment
 Inherited
deserialize(xml:XML):*
deserializes the object from xml.
Enumerable
 Inherited
serialize(xml:XML):void
serializes the object to XML.
Enumerable
Public Constants
 ConstantDefined By
  BOTTOM_LEFT : SceneAlignment
[static]
SceneAlignment
  BOTTOM_RIGHT : SceneAlignment
[static]
SceneAlignment
  CENTER : SceneAlignment
[static]
SceneAlignment
  DEFAULT_ALIGNMENT : SceneAlignment
[static]
SceneAlignment
  TOP_LEFT : SceneAlignment
[static]
SceneAlignment
  TOP_RIGHT : SceneAlignment
[static]
SceneAlignment
Property Detail
defaultTypeproperty
defaultType:Enumerable  [read-only] [override]

This must be implemented by subclasses. It is the type to use when a string isn't found in the TypeMap.


Implementation
    public function get defaultType():Enumerable
typeMapproperty 
typeMap:Dictionary  [read-only] [override]

This must be implemented by subclasses. It is a dictionary that maps the names of enumerable values to the instance of the enumerable they represent.


Implementation
    public function get typeMap():Dictionary
Method Detail
calculate()method
public static function calculate(outPoint:Point, alignment:SceneAlignment, sceneWidth:int, sceneHeight:int):void

Given an alignment constant from this class, calculate

Parameters

outPoint:Point
 
alignment:SceneAlignment
 
sceneWidth:int
 
sceneHeight:int

Constant Detail
BOTTOM_LEFTConstant
public static const BOTTOM_LEFT:SceneAlignment

BOTTOM_RIGHTConstant 
public static const BOTTOM_RIGHT:SceneAlignment

CENTERConstant 
public static const CENTER:SceneAlignment

DEFAULT_ALIGNMENTConstant 
public static const DEFAULT_ALIGNMENT:SceneAlignment

TOP_LEFTConstant 
public static const TOP_LEFT:SceneAlignment

TOP_RIGHTConstant 
public static const TOP_RIGHT:SceneAlignment