PlottI
 All Classes Files Functions Variables Enumerations Enumerator Pages
Public Member Functions | List of all members
ColorGradient Class Reference

Class for saving color gradients (palettes) More...

#include <Color.h>

Specifications

Class for saving color gradients (palettes)

The constructor takes two mandatory arguments:

Optionally you can specify:

The color gradient can be accessed by calling the methods GetPalette() or GetGradient() that will return a vector of type Int_t or Color_t respectively. If you are using the SetPalette() option that PlottI provides you can use the ColorGradient instance directly.

For a full list and preview of PlottI color gradients see Color Gradients in PlottI

Public Member Functions

 ColorGradient (Int_t nPoints, const vector< color > &rgbEndpoints, const vector< Double_t > &stops={}, Float_t alpha=1)
 Constructor. More...
 
vector< Int_t > GetPalette ()
 
vector< Color_t > GetGradient ()
 
Int_t GetNpoints ()
 

Constructor & Destructor Documentation

ColorGradient::ColorGradient ( Int_t  nPoints,
const vector< color > &  rgbEndpoints,
const vector< Double_t > &  stops = {},
Float_t  alpha = 1 
)

Constructor.

Generate color gradient with nPoints colors from rgbEndpoints alpha transparency.

Parameters
[in]nPointsNumber of colors that will be generated from the color endpoints
[in]rgbEndpointsColor endpoints in RGB format using color structure
[in]stopsDetermines spacing of colors in gradient, if not given the colors will be spaced evenly
[in]alphaDetermines alpha value of colors

Member Function Documentation

vector< Color_t > ColorGradient::GetGradient ( )

Return stored palette as vector of Color_t

Int_t ColorGradient::GetNpoints ( )

Return the number of color points of the stored palette

vector< Int_t > ColorGradient::GetPalette ( )

Return stored palette as vector of Int_t


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