Package | com.esri.bacore.thematicmapping |
Class | public class TMColorRamp |
Inheritance | TMColorRamp ColorRamp flash.events.EventDispatcher |
See also
Property | Defined By | ||
---|---|---|---|
colorRampSchema : ColorRampSchema
Color ramp schema. | TMColorRamp | ||
isUpdatable : Boolean [override] [read-only]
Specifies an ability to update discrete ramp colors. | TMColorRamp | ||
rampColorsCount : uint [override]
The current number of discrete colors specified in this color ramp. | TMColorRamp |
Method | Defined By | ||
---|---|---|---|
TMColorRamp(schema:ColorRampSchema, colorsCount:int, isUpdatable:Boolean = true)
Creates a new instance of the TMColorRamp class. | TMColorRamp | ||
getColorByIndex(index:int):uint [override]
Gets a discrete color by index. | TMColorRamp | ||
getColorByValue(value:Number):uint
Gets a gradient color by value in the range of [0, 1]. | ColorRamp | ||
mixColors(color1:uint, color2:uint, value:Number):uint [static]
Mixes color1 with color2 using linear interpolation. | ColorRamp | ||
updateRampColor(index:int, value:uint):Boolean [override]
Updates an individual color of this color ramp with a user-defined value. | TMColorRamp | ||
updateRampColors(values:Array):Boolean [override]
Updates all colors of this color ramp with user-defined values. | TMColorRamp |
colorRampSchema | property |
colorRampSchema:ColorRampSchema
Color ramp schema.
public function get colorRampSchema():ColorRampSchema
public function set colorRampSchema(value:ColorRampSchema):void
isUpdatable | property |
isUpdatable:Boolean
[read-only] [override] Specifies an ability to update discrete ramp colors.
public function get isUpdatable():Boolean
rampColorsCount | property |
rampColorsCount:uint
[override] The current number of discrete colors specified in this color ramp.
public function get rampColorsCount():uint
public function set rampColorsCount(value:uint):void
TMColorRamp | () | Constructor |
public function TMColorRamp(schema:ColorRampSchema, colorsCount:int, isUpdatable:Boolean = true)
Creates a new instance of the TMColorRamp class.
Parametersschema:ColorRampSchema — Color ramp schema.
| |
colorsCount:int — The numbers of colors (should be positive).
| |
isUpdatable:Boolean (default = true ) — Allows update ramp colors with user-defined values.
|
getColorByIndex | () | method |
override public function getColorByIndex(index:int):uint
Gets a discrete color by index.
If the index
is negative, the first color is returned.
If the index
is greater or equal to rampColorsCount
the last color is returned.
Parameters
index:int — Zero-based index of color in the discrete color ramp.
|
uint — Required ARGB-color.
|
updateRampColor | () | method |
override public function updateRampColor(index:int, value:uint):Boolean
Updates an individual color of this color ramp with a user-defined value.
The updated color will be reset when the number of colors is changed. If the color ramp doesn't updatable, this operation is ignored.
Parameters
index:int — Zero-based index of color to be updated.
| |
value:uint — New value of color.
|
Boolean |
updateRampColors | () | method |
override public function updateRampColors(values:Array):Boolean
Updates all colors of this color ramp with user-defined values.
The number of input colors can differ from the current number of ramp colors. In this case, the current number of colors is changed to match with the number of input colors.
The updated colors will be reset when the number of colors is changed. If the color ramp doesn't updatable, this operation is ignored.
Parameters
values:Array — Values of colors.
|
Boolean |