Packagecom.degrafa.geometry.layout
Classpublic class LayoutUtils

LayoutUtils is an all staic helper class for layout related tasks.



Public Methods
 MethodDefined by
  
LayoutUtils
  
applyOffsetToCommandStack(commandStack:CommandStack, xMultiplier:Number, yMultiplier:Number, minPoint:Point, lastPoint:Point = null):void
[static] Traverses through the given command stack applying the offset.
LayoutUtils
  
calculateRatios(commandStack:CommandStack, destinationRectangle:Rectangle):void
[static] Proportionally sizes each point in the command array to the given width and height taking into account any additional x or y offset that the command data may have.
LayoutUtils
  
getCommandStackMinMax(commandStack:CommandStack, maxPoint:Point, minPoint:Point, lastX:Number, lastY:Number):void
[static] Traverses the given command stack and calculates the min and max points.
LayoutUtils
Constructor detail
LayoutUtils()constructor
public function LayoutUtils()
Method detail
applyOffsetToCommandStack()method
public static function applyOffsetToCommandStack(commandStack:CommandStack, xMultiplier:Number, yMultiplier:Number, minPoint:Point, lastPoint:Point = null):void

Traverses through the given command stack applying the offset.

Parameters
commandStack:CommandStack
 
xMultiplier:Number
 
yMultiplier:Number
 
minPoint:Point
 
lastPoint:Point (default = null)
calculateRatios()method 
public static function calculateRatios(commandStack:CommandStack, destinationRectangle:Rectangle):void

Proportionally sizes each point in the command array to the given width and height taking into account any additional x or y offset that the command data may have. This ensures that rendering is always started at point(0,0) and that the maximum allotted spaced is used for both width and height.

Parameters
commandStack:CommandStack
 
destinationRectangle:Rectangle
getCommandStackMinMax()method 
public static function getCommandStackMinMax(commandStack:CommandStack, maxPoint:Point, minPoint:Point, lastX:Number, lastY:Number):void

Traverses the given command stack and calculates the min and max points.

Parameters
commandStack:CommandStack
 
maxPoint:Point
 
minPoint:Point
 
lastX:Number
 
lastY:Number