ColorInterpolator

interface ColorInterpolator

A ColorInterpolator represents a color space between 2 TileColor. lowColor sits at the lowest end of the color space, and will be the result of a call to getColorAtRatio with a ratio of 0.0. highColor is conversely the highest value, and a ratio of 1.0 will return it. Calling getColorAtRatio with any other ratio (between 0.0 and 1.0) will return a new TileColor that is the linear interpolation between lowColor and highColor on their R, G, B and A values.

A ColorInterpolator is created with the function TileColor.interpolateTo

Functions

equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
getColorAtRatio
Link copied to clipboard
common
abstract fun getColorAtRatio(ratio: Double): TileColor
Returns a new TileColor which is the interpolation between the two colors of the interpolator at the given ratio (between 0.0 and 1.0).
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
toString
Link copied to clipboard
common
open fun toString(): String

Properties

highColor
Link copied to clipboard
common
abstract val highColor: TileColor
Represents the highest value in the color space.
lowColor
Link copied to clipboard
common
abstract val lowColor: TileColor
Represents the lowest value in the color space.

Inheritors

DefaultColorInterpolator
Link copied to clipboard

Sources

(source)
Link copied to clipboard