|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IAlgorithmicColorRamp
Provides access to members that control the AlgorithmicColorRamp. A color ramp defined by two colors and the algorithm used to traverse the intervening color space between them.
The IAlgorithmicColorRamp interface allows you to specify how the series of colors is created using several properties.
You can use any objects that supports the IColor interface to set the FromColor or ToColor properties, although returning the FromColor or ToColor always gives an HSVColor object. Note that the FromColor and ToColor properties are set by value; therefore you cannot change the RGB values directly from the IColor interface returned by the IAlgorithmicColorRamp interface.
There are three algorithms that the IAlgorithmicColorRamp interface uses: esriCIELabAlgorithm, esriHSVAlgorithm, and esriLabLChAlgorithm. There is very little difference between these Algorithms when the FromColor and the ToColor are of the same or very similar hue (for the sake of simplicity we will base this discussion on the HSV color model). But when the hues for the FromColor and the ToColor are different (Hue is different by 40 or more on a 0-360 scale), the algorithms produce different results. The esriHSVAlgorithm traverses the hue difference in a purely linear fashion, resulting in a bright ramp where all intermediate colors are represented. For instance, a ramp from red to green would include orange, yellow, and yellow-green. The esriCIELabAlgorithm and esriLabLChAlgorithm produce a more blended result. Thus, a ramp from dark green to orange would not contain a bright yellow, but instead a more brown and green-gold or green-brown intermediate color. The advantage of the CIELAB algorithm is that the colors of the ramp are visually equidistant, which produces a better ramp.
Use the IAlgorithmicColorRamp when representing data in a layer that is sequential (interval or ratio data). Or, use the IAlgorithmicColorRamp when creating an IGradientFill symbol.
IPresetColorRamp
,
IMultiPartColorRamp
,
IAlgorithmicColorRamp
,
IColorRamp.getColor(int)
,
IRandomColorRamp
,
IColorRamp.createRamp(boolean[])
,
IColorRamp
Method Summary | |
---|---|
int |
getAlgorithm()
The algorithm used to ramp between the first and last colors. |
IColor |
getFromColor()
The first color in the color ramp. |
IColor |
getToColor()
The last color in the color ramp. |
void |
setAlgorithm(int algorithm)
The algorithm used to ramp between the first and last colors. |
void |
setFromColor(IColor color)
The first color in the color ramp. |
void |
setToColor(IColor color)
The last color in the color ramp. |
Methods inherited from interface com.esri.arcgis.display.IColorRamp |
---|
createRamp, getColor, getColors, getName, getSize, setName, setSize |
Method Detail |
---|
IColor getFromColor() throws IOException, AutomationException
FromColor is the first color in a IAlgorithmicColorRamp.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IHsvColor
,
IHlsColor
void setFromColor(IColor color) throws IOException, AutomationException
color
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IHsvColor
,
IHlsColor
IColor getToColor() throws IOException, AutomationException
ToColor is the second color in a IAlgorithmicColorRamp.
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IHsvColor
,
IHlsColor
void setToColor(IColor color) throws IOException, AutomationException
color
- A reference to a com.esri.arcgis.display.IColor (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.IHsvColor
,
IHlsColor
void setAlgorithm(int algorithm) throws IOException, AutomationException
algorithm
- A com.esri.arcgis.display.esriColorRampAlgorithm constant (in)
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.int getAlgorithm() throws IOException, AutomationException
Algorithm is the ramping algorithm used to create intermediate colors between the FromColor and the ToColor .
IOException
- If there are interop problems.
AutomationException
- If the ArcObject component throws an exception.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |