Packageflare.util.palette
Classpublic class SizePalette
InheritanceSizePalette Inheritance Palette

Palette for size values represeneted as scale factors. The SizePalette class distinguishes between 1D and 2D scale factors, with a square root being applied to 2D scale factors to ensure that area scales linearly with the size value.



Public Properties
 PropertyDefined by
  is2D : Boolean
Flag indicating if this size palette is for 2D shapes.
SizePalette
  maximumSize : Number
the maximum scale factor in this size palette.
SizePalette
  minimumSize : Number
The minimum scale factor in this size palette.
SizePalette
 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
  
SizePalette(minSize:Number = 1, maxSize:Number = 6, is2D:Boolean = true)
Creates a new SizePalette.
SizePalette
  
getSize(v:Number):Number
Retrieves the size value corresponding to the input interpolation fraction.
SizePalette
  
getValue(f:Number):Object
Retrieves the palette value corresponding to the input interpolation fraction.
SizePalette
Property detail
is2Dproperty
is2D:Boolean  [read-write]

Flag indicating if this size palette is for 2D shapes.

Implementation
    public function get is2D():Boolean
    public function set is2D(value:Boolean):void
maximumSizeproperty 
maximumSize:Number  [read-write]

the maximum scale factor in this size palette.

Implementation
    public function get maximumSize():Number
    public function set maximumSize(value:Number):void
minimumSizeproperty 
minimumSize:Number  [read-write]

The minimum scale factor in this size palette.

Implementation
    public function get minimumSize():Number
    public function set minimumSize(value:Number):void
Constructor detail
SizePalette()constructor
public function SizePalette(minSize:Number = 1, maxSize:Number = 6, is2D:Boolean = true)

Creates a new SizePalette.

Parameters
minSize:Number (default = 1) — the minimum scale factor in the palette
 
maxSize:Number (default = 6) — the maximum scale factor in the palette
 
is2D:Boolean (default = true) — flag indicating if the size values are for a 2D shape, true by default
Method detail
getSize()method
public function getSize(v:Number):Number

Retrieves the size value corresponding to the input interpolation fraction. If the is2D flag is true, the square root of the size value is returned.

Parameters
v:Number — an interpolation fraction

Returns
Number — the size value corresponding to the input fraction
getValue()method 
public override function getValue(f:Number):Object

Retrieves the palette value corresponding to the input interpolation fraction.

Parameters
f:Number — an interpolation fraction

Returns
Object — the palette value corresponding to the input fraction