ColorRamp
Description
- Derived from
-
ColorRampBase abstract
This class represents a color ramp.
A color ramp consists of one or more color ramp slots; each slot holds an X-coordinate and a color value.
Public / Constants
Earth
A color ramp for Earth with intuitive colors.
Use ellipsoid/geoid heights as input for the color ramp: -1000m .. 8000m.
Mars
A rainbow color ramp for Mars.
Use areoid heights as input for the color ramp: -7500m .. 15000m.
- See also
Mask
A simple mask shape.
To create an equivalent color ramp, call Shape, passing 0
to the first parameter and the default values to the remaining ones.
Moon
A rainbow color ramp for the Moon.
Use reference sphere heights as input for the color ramp: -9000m .. 10000m.
- See also
Outline
A simple outline shape.
To create an equivalent color ramp, call Shape, the default parameter values.
Planet
A rainbow color ramp for a planet.
Use normalized heights as input for the color ramp: -1 .. +1.
- See also
Public / Constructors
Color
2 overloads
Creates a color ramp with a single color.
The color is placed at the X-coordinate 0.0
.
Creates a color ramp with two colors.
Shape
Creates a color ramp for drawing the interior and/or border of a shape.
Here are some common usage scenarios for this method:
-
ColorRamp.Shape()
Draw the shape with a single pixel black border and white fill (good for debug / test). -
ColorRamp.Shape(0)
Draw the shape without border and white fill (good for modulation / clip masks). -
ColorRamp.Shape(0,0,fill)
Draw the shape without border and the given fill color. -
ColorRamp.Shape(thickness,border,0)
Draw the shape with a border of the given thickness and color, without fill.
The returned color ramps contains four colors:
X | Y --------+-------- -h - e | fill -h | border +h | border +h + e | empty
where h
is half of thickness opt, e
is epsilon opt and empty
is the same color as border opt with its alpha channel set to zero.