Packageflare.util.palette
Classpublic class ShapePalette
InheritanceShapePalette Inheritance Palette

Palette for shape values that maps integer indices to shape drawing functions.

See also

flare.vis.util.graphics.Shapes


Public Properties
 PropertyDefined by
 Inheritedsize : int
The number of values in the palette.
Palette
 Inheritedvalues : Array
Array of palette values.
Palette
Protected Properties
 PropertyDefined by
 Inherited_values : Array
Array of palette values.
Palette
Public Methods
 MethodDefined by
  
Creates a new, empty ShapePalette.
ShapePalette
  
addShape(shape:String):void
Adds a shape to this ShapePalette.
ShapePalette
  
[static] Returns a default shape palette instance.
ShapePalette
  
getShape(idx:uint):String
Gets the shape at the given index into the palette.
ShapePalette
 Inherited
getValue(f:Number):Object
Retrieves the palette value corresponding to the input interpolation fraction.
Palette
  
setShape(idx:uint, shape:String):void
Sets the shape at the given index into the palette.
ShapePalette
Constructor detail
ShapePalette()constructor
public function ShapePalette()

Creates a new, empty ShapePalette.

Method detail
addShape()method
public function addShape(shape:String):void

Adds a shape to this ShapePalette.

Parameters
shape:String — the name of the shape. This name should be registered with a drawing function using the flare.vis.util.graphics.Shapes class.
defaultPalette()method 
public static function defaultPalette():ShapePalette

Returns a default shape palette instance. The default palette consists of (in order): circle, square, cross, "x", diamond, down-triangle, up-triangle, left-triangle, and right-triangle shapes.

Returns
ShapePalette — the default shape palette
getShape()method 
public function getShape(idx:uint):String

Gets the shape at the given index into the palette.

Parameters
idx:uint — the index of the shape

Returns
String — the name of the shape
setShape()method 
public function setShape(idx:uint, shape:String):void

Sets the shape at the given index into the palette.

Parameters
idx:uint — the index of the shape
 
shape:String — the name of the shape. This name should be registered with a drawing function using the flare.vis.util.graphics.Shapes class.