LevelS C++ support library  3.83
Public Member Functions | List of all members
Palette Class Reference

#include <ls_image.h>

Inherits linearMap< T >.

Public Member Functions

void add (float f, const Colour &c)
 
void setPredefined (int num)
 
Colour Get_Colour (float f) const
 

Detailed Description

A class for mapping floting-point values into colours.

Definition at line 48 of file ls_image.h.

Member Function Documentation

◆ add()

void Palette::add ( float  f,
const Colour &  c 
)
inline

Adds a new data point f, with the corresponding colour c. The additions must be done in the order of ascending f.

Definition at line 53 of file ls_image.h.

◆ setPredefined()

void Palette::setPredefined ( int  num)

Sets the palette to the predefined palette num.

Definition at line 45 of file ls_image.cc.

◆ Get_Colour()

Colour Palette::Get_Colour ( float  f) const
inline

Returns the colour corresponding to the value f. The colour is determined by linear interpolation between neighbouring data points.

Definition at line 61 of file ls_image.h.


The documentation for this class was generated from the following files:

Generated on Wed Nov 13 2024 12:18:16 for LevelS C++ support library