Packagerdfbrowser.components
Classpublic class CanvasCluster
InheritanceCanvasCluster Inheritance mx.containers.Canvas

This class creates a canvas object which creates and contains the galaxy. The galaxy is created following the process:



Public Properties
 PropertyDefined By
  drawQueue : Array = null
Array of the elements to draw.
CanvasCluster
Public Methods
 MethodDefined By
  
CanvasCluster(data:Array, maxRadius:Number, maxFill:Number, maxAlpha:Number)
CanvasCluster class constructor.
CanvasCluster
  
addCircle(element:CanvasItem):void
This function places the CanvasItem element.
CanvasCluster
  
checkCollision(element:CanvasItem):Boolean
This functions checks if the CanvasItem element doesn't have points in common with other element of the galaxy
CanvasCluster
  
process(data:Array, maxRadius:Number, maxFill:Number, maxAlpha:Number):void
This function creates the galaxy.
CanvasCluster
Property Detail
drawQueueproperty
public var drawQueue:Array = null

Array of the elements to draw.

The default value is null.

Constructor Detail
CanvasCluster()Constructor
public function CanvasCluster(data:Array, maxRadius:Number, maxFill:Number, maxAlpha:Number)

CanvasCluster class constructor.

Parameters
data:Array — Array of CanvasItem elements to draw.
 
maxRadius:Number
 
maxFill:Number
 
maxAlpha:Number
Method Detail
addCircle()method
public function addCircle(element:CanvasItem):void

This function places the CanvasItem element. It sets the x and y coordinates of the element and introduces it into the "drawn" array.

Parameters

element:CanvasItem — CanvasItem element to draw.

checkCollision()method 
public function checkCollision(element:CanvasItem):Boolean

This functions checks if the CanvasItem element doesn't have points in common with other element of the galaxy

Parameters

element:CanvasItem — CanvasItem element to check

Returns
Boolean — true: the element has points in common with other element (collision). false: the element has not points in common with other element.
process()method 
public function process(data:Array, maxRadius:Number, maxFill:Number, maxAlpha:Number):void

This function creates the galaxy. It process all the data and draw the elements.

Parameters

data:Array — Array of CanvasItem elements to draw.
 
maxRadius:Number
 
maxFill:Number
 
maxAlpha:Number