41 : fCoordinateMode(kObjectBoundingMode)
51 : fCoordinateMode(
mode)
53 assert(nPoints != 0 &&
"TColorGradient, number of points is 0");
54 assert(
points !=
nullptr &&
"TColorGradient, points parameter is null");
55 assert(indices !=
nullptr &&
"TColorGradient, indices parameter is null");
67 : fCoordinateMode(
mode)
69 assert(nPoints != 0 &&
"TColorGradient, number of points is 0");
70 assert(
points !=
nullptr &&
"TColorGradient, points parameter is null");
71 assert(
colors !=
nullptr &&
"TColorGradient, colors parameter is null");
82 assert(nPoints != 0 &&
"ResetColor, number of points is 0");
83 assert(
points !=
nullptr &&
"ResetColor, points parameter is null");
84 assert(colorIndices !=
nullptr &&
"ResetColor, colorIndices parameter is null");
90 for (
UInt_t i = 0, pos = 0; i < nPoints; ++i, pos += 4) {
92 if (!clearColor ||
dynamic_cast<const TColorGradient *
>(clearColor)) {
94 Error(
"ResetColor",
"Bad color for index %d, set to opaque black", colorIndices[i]);
100 clearColor->
GetRGB(rgba[0], rgba[1], rgba[2]);
116 assert(nPoints != 0 &&
"ResetColor, number of points is 0");
117 assert(
points !=
nullptr &&
"ResetColor, points parameter is null");
118 assert(
colors !=
nullptr &&
"ResetColor, colors parameter is null");
173 if (
gROOT->GetColor(colorIndex)) {
174 Warning(
"RegisterColor",
"Color with index %d is already defined", colorIndex);
179 colors->AddAtAndExpand(
this, colorIndex);
181 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
TColorGradient()
Constructor.
void SetCoordinateMode(ECoordinateMode mode)
Set coordinate mode.
void ResetColor(UInt_t nPoints, const Double_t *points, const Color_t *colorIndices)
Reset 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 GetRGB(Float_t &r, Float_t &g, Float_t &b) const
static Int_t GetColor(const char *hexcolor)
Static method returning color number for color specified by hex color string of form: "#rrggbb",...
Int_t fNumber
Color number identifier.
Define a linear color gradient.
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 SetName(const char *name)
Set the name of the TNamed.
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.
Define a radial color gradient.
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.