17#include <nlohmann/json.hpp>
37REveRGBAPalette::REveRGBAPalette() :
43 fLowLimit(0), fHighLimit(0), fMinVal(0), fMaxVal(0),
47 fShowDefValue (
kTRUE),
49 fUnderflowAction (kLA_Cut),
50 fOverflowAction (kLA_Clip),
56 fNBins(0), fCAMin(0), fCAMax(0), fColorArray(nullptr)
76 fLowLimit(0), fHighLimit(0), fMinVal(0), fMaxVal(0),
79 fInterpolate (interp),
80 fShowDefValue (showdef),
81 fFixColorRange (fixcolrng),
82 fUnderflowAction (kLA_Cut),
83 fOverflowAction (kLA_Clip),
89 fNBins(0), fCAMin(0), fCAMax(0), fColorArray(nullptr)
112 using namespace TMath;
117 if (val >=
fCAMax)
f = nCol - 1;
119 else f = (val -
fCAMin)/div*(nCol - 1);
ULong_t Pixel_t
Pixel value.
winID h TVirtualViewer3D TVirtualGLPainter p
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pix
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void pixel
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
R__EXTERN TStyle * gStyle
REveElement::List_t fNieces
virtual Int_t WriteCoreJson(nlohmann::json &cj, Int_t rnr_offset)
Write core json.
void SetMinMax(Int_t min, Int_t max)
Set current min/max values.
void SetUIDoubleRep(Bool_t b, Double_t f=1, Double_t c=0)
Set flag determining whether GUI editor and overlays should show limits and axis values as real value...
void SetupColorArray() const
Construct internal color array that maps signal value to RGBA color.
void SetMin(Int_t min)
Set current min value.
void ClearColorArray()
Clear internal color array.
void SetDefaultColorPixel(Pixel_t pix)
Set default color.
void SetUnderColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255)
Set underflow color.
void SetDefaultColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255)
Set default color.
void SetLimitsScaleMinMax(Int_t low, Int_t high)
Set low/high limits and rescale current min/max values.
void SetMax(Int_t max)
Set current max value.
void SetLimits(Int_t low, Int_t high)
Set low/high limits on signal value.
void SetUnderColorPixel(Pixel_t pix)
Set underflow color.
void SetInterpolate(Bool_t b)
Set interpolation flag.
void SetOverColorRGBA(UChar_t r, UChar_t g, UChar_t b, UChar_t a=255)
Set overflow color.
void SetFixColorRange(Bool_t v)
Set flag specifying how the palette is mapped to signal values: true - LowLimit -> HighLimit false - ...
Int_t WriteCoreJson(nlohmann::json &j, Int_t rnr_offset) override
Write core json.
void SetUnderColor(Color_t ci)
Set underflow color.
~REveRGBAPalette() override
Destructor.
void SetDefaultColor(Color_t ci)
Set default color.
REveRGBAPalette()
Constructor.
void SetupColor(Int_t val, UChar_t *pix) const
Set RGBA color 'pixel' for signal-value 'val'.
void SetOverColor(Color_t ci)
Set overflow color.
void SetOverColorPixel(Pixel_t pix)
Set overflow color.
REveRefCnt REveRefCnt base-class (interface)
static void ColorFromIdx(Color_t ci, UChar_t col[4], Bool_t alpha=kTRUE)
Fill col with RGBA values corresponding to index ci.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Int_t GetColorPalette(Int_t i) const
Return color number i in current palette.
Int_t GetNumberOfColors() const
Return number of colors in the color palette.
Int_t Nint(T x)
Round to nearest integer. Rounds half integers to the nearest even integer.
Short_t Max(Short_t a, Short_t b)
Returns the largest of a and b.
Short_t Min(Short_t a, Short_t b)
Returns the smallest of a and b.