Core 1.0
GenericPalette Class Reference

Core class for palettes. More...

#include <palette.h>

Inheritance diagram for GenericPalette:
AnalyticPalette Palette

Public Member Functions

virtual Color GetColor (double) const
 Compute the color.
 
virtual QImage Draw (int=32, int=1024) const
 Draws an image with the colors of the palette.
 
virtual QImage CreateImage (int, int=16, bool=false) const
 Create an image form a palette.
 

Detailed Description

Core class for palettes.

Member Function Documentation

◆ CreateImage()

QImage GenericPalette::CreateImage ( int s,
int t = 16,
bool v = false ) const
virtual

Create an image form a palette.

Parameters
sSize of the image.
tThickness of color ramp.
vVertical flag, boolean set to true to generate a vertical ramp.

◆ Draw()

QImage GenericPalette::Draw ( int width = 32,
int height = 1024 ) const
virtual

Draws an image with the colors of the palette.

The palette is drawn vertically.

Parameters
width,heightWidth and height of the image.

◆ GetColor()

Color GenericPalette::GetColor ( double u) const
virtual

Compute the color.

Parameters
uPalette entry.

Reimplemented in AnalyticPalette, and Palette.