IColorRamp

Description

interface Tinman.Terrain.Util.IColorRamp

Derived from

ISerializable
IConfigurable
IEquatable<IColorRamp>

Extended by

ColorRampBase abstract

Base interface for classes that provide a color ramp.

A color ramp has zero or more color slots, where each slot has an input coordinate and an associated color value.

Public / Methods

Get


public method Get → (1)

in : float64

Coordinate of color to return.

returns → int64

The color value.

Returns an interpolated color on this color ramp.

Index


public method Index → (1)

in : float64

Coordinate of color to return.

returns → float64

The color index.

Returns a color index on this color ramp.

Modulate


public method Modulate → (1)

color in : int64

The color to modulate with.

returns → IColorRamp

The resulting color ramp.

Modulates the colors in this color ramp.

Transform


public method Transform → (2)

offset in : float64

Offset value to add to scaled input X-coordinates.

scale opt : float64 = 1

Scale factor to apply to input X-coordinates.

returns → IColorRamp

The resulting color ramp.

Transforms the input coordinate of this color ramp.

Input X-coordinates are transformed as follows:

xOut = offset + scale * xIn
xIn  = (xOut - offset) / scale
     = xOut / scale - offset / scale

where xIn refers to the coordinate passed to the returned color ramp and xOut is the coordinate that is passed to this color ramp.

Public / Attributes

Range


public attribute Range → (get)

value : RangeD

The coordinate range.

Returns the coordinate range of this color ramp.

Extensions

To​Color​Buffer

2 overloads


public static method ToColorBuffer1 → (1)

opt : int32 = 256

[>0]
The number of palette colors.

returns → ColorBuffer

The created color buffer.

Converts this color ramp into a color buffer with a height of one.

See also

IColorRamp.Range


public static method ToColorBuffer2 → (3)

x1 in : float64

X-coordinate of first palette color.

x2 in : float64

X-coordinate of last palette color.

opt : int32 = 256

[>0]
The number of palette colors.

returns → ColorBuffer

The created color buffer.

Converts this color ramp into a color buffer with a height of one.

To​Color​Palette

2 overloads


public static method ToColorPalette1 → (1)

opt : int32 = 256

[>0]
The number of palette colors.

returns → int64 [ ]

The created color palette.

Converts this color ramp into a color palette.

See also

IColorRamp.Range


public static method ToColorPalette2 → (3)

x1 in : float64

X-coordinate of first palette color.

x2 in : float64

X-coordinate of last palette color.

opt : int32 = 256

[>0]
The number of palette colors.

returns → int64 [ ]

The created color palette.

Converts this color ramp into a color palette.