Package | com.esri.bacore.thematicmapping |
Class | public final class ColorRampSchema |
Inheritance | ColorRampSchema Object |
See also
Property | Defined By | ||
---|---|---|---|
Name : String [read-only]
Color ramp name. | ColorRampSchema |
Method | Defined By | ||
---|---|---|---|
ColorRampSchema(name:String, colorRampsColors:Array)
Creates a new instance of the ColorRampSchema class. | ColorRampSchema | ||
colorFromHexCode(hexCode:String):uint [static]
Creates a color from hexadecimal string value. | ColorRampSchema | ||
getRampColors(colorsCount:int):Array
Gets a new collection of ramp colors. | ColorRampSchema | ||
loadColorRampSchemas(schemas:XML):Array [static]
Loads a collection of color ramp schemas from XML. | ColorRampSchema |
Name | property |
Name:String
[read-only] Color ramp name.
public function get Name():String
ColorRampSchema | () | Constructor |
public function ColorRampSchema(name:String, colorRampsColors:Array)
Creates a new instance of the ColorRampSchema class.
The colorRampsColors
parameter is an array of arrays
containing items of the uint type.
name:String — Color ramp name.
| |
colorRampsColors:Array — Array of color gradients.
|
colorFromHexCode | () | method |
public static function colorFromHexCode(hexCode:String):uint
Creates a color from hexadecimal string value.
Parameters
hexCode:String — Hexadecimal string value in the form "0xRRGGBB" or "#RRGGBB".
|
uint — A new instance of ARGB-color.
|
getRampColors | () | method |
public function getRampColors(colorsCount:int):Array
Gets a new collection of ramp colors.
If this color ramp schema is simple (consists of a unique gradient specified by two colors),
ramp colors are calculated using mid values of ramp intervals. Otherwise, the best matching
gradient is selected whose number of color equals to colorsCount
.
If an appropriated gradient is not found, the ramp colors are rendered
using edge values of ramp intervals for predefined colors of a color gradient with the nearest
number of colors.
Parameters
colorsCount:int — A number of colors required.
|
Array — An array containing the required number of colors.
|
loadColorRampSchemas | () | method |
public static function loadColorRampSchemas(schemas:XML):Array
Loads a collection of color ramp schemas from XML.
Parameters
schemas:XML — XML containing schemas.
|
Array — An array of ColorRampSchema items.
|