43 : fCoordinateMode(
mode)
45 assert(nPoints != 0 &&
"TColorGradient, number of points is 0");
46 assert(
points !=
nullptr &&
"TColorGradient, points parameter is null");
47 assert(indices !=
nullptr &&
"TColorGradient, indices parameter is null");
59 : fCoordinateMode(
mode)
61 assert(nPoints != 0 &&
"TColorGradient, number of points is 0");
62 assert(
points !=
nullptr &&
"TColorGradient, points parameter is null");
63 assert(
colors !=
nullptr &&
"TColorGradient, colors parameter is null");
74 assert(nPoints != 0 &&
"ResetColor, number of points is 0");
75 assert(
points !=
nullptr &&
"ResetColor, points parameter is null");
76 assert(colorIndices !=
nullptr &&
"ResetColor, colorIndices parameter is null");
78 std::vector<Double_t>
colors(nPoints * 4);
80 for (
UInt_t i = 0, pos = 0; i < nPoints; ++i, pos += 4) {
83 Error(
"ResetColor",
"Bad color for index %d, set to opaque black", colorIndices[i]);
90 Warning(
"ResetColor",
"Gradient color index %d used as base for other gradient color", colorIndices[i]);
107 assert(nPoints != 0 &&
"ResetColor, number of points is 0");
108 assert(
points !=
nullptr &&
"ResetColor, points parameter is null");
109 assert(
colors !=
nullptr &&
"ResetColor, colors parameter is null");
127 if (indx*4 + 3 <
fColors.size())
136 if (indx*4 + 3 <
fColors.size())
191 if (
gROOT->GetColor(colorIndex)) {
192 Warning(
"RegisterColor",
"Color with index %d is already defined", colorIndex);
197 colors->AddAtAndExpand(
this, colorIndex);
199 Error(
"RegisterColor",
"List of colors is a null pointer in gROOT, color was not registered");
Option_t Option_t TPoint TPoint const char mode
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t points
TColorGradient extends basic TColor.
void RegisterColor(Color_t colorIndex)
Register color.
const Double_t * GetColors() const
Get colors.
std::vector< Double_t > fColorPositions
std::vector< Color_t >::size_type SizeType_t
Double_t GetColorAlpha(UInt_t indx) const
Return alpha parameter of selected color.
void SetCoordinateMode(ECoordinateMode mode)
Set coordinate mode.
void ResetColor(UInt_t nPoints, const Double_t *points, const Color_t *colorIndices)
Reset color.
void SetColorAlpha(UInt_t indx, Double_t alpha)
Change alpha parameter of the color.
SizeType_t GetNumberOfSteps() const
Get number of steps.
ECoordinateMode fCoordinateMode
ECoordinateMode GetCoordinateMode() const
Get coordinate mode.
const Double_t * GetColorPositions() const
Get color positions.
std::vector< Double_t > fColors
The color creation and management class.
virtual void SetRGB(Float_t r, Float_t g, Float_t b)
Initialize this color and its "dark" and "bright" associated colors.
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
void SetName(const char *name) override
Set the color name and change also the name of the "dark" and "bright" associated colors if they exis...
Int_t fNumber
Color number identifier.
virtual void SetAlpha(Float_t a)
void SetStartEnd(const Point &p1, const Point &p2)
Set end and start.
const Point & GetEnd() const
Get end.
const Point & GetStart() const
Get start.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Double_t GetRadius() const
Get radius.
void SetStartEndR1R2(const Point &p1, Double_t r1, const Point &p2, Double_t r2)
Set start and end R1 and R2.
const Point & GetStart() const
Get start.
Double_t GetR2() const
Get R2.
const Point & GetCenter() const
Get center.
EGradientType GetGradientType() const
Get gradient type.
const Point & GetEnd() const
Get end.
void SetRadialGradient(const Point ¢er, Double_t radius)
Set radial gradient.
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
static uint64_t sum(uint64_t i)