ROOT Version: 6.26/06
Platform: Rocky Linux release 8.4
Compiler: gcc (GCC) 8.4.1
Hi,
in my code I’m using a TPolyLine which is filled with a color.
TPolyLine *line = new TPolyLine (5, x, y);
auto color = TColor::GetColor (kRGB[i].red, kRGB[i].green, kRGB[i].blue);
auto color_transparent = TColor::GetColorTransparent (color, kRGB[i].alpha);
line->SetFillColor (color_transparent);
Using this code I’m wondering, since both TColor::GetColor and TColor::GetColorTransparent returning a Int_t alias int and SetFillColor takes a Color_t alias short.
If the color index received by GetColor or GetColorTransparent passes the 16 Bit the short can take the index swaps into negative range and then again into positive range and so on.
Using a negative color index leads to problems with the fill color.
Can you confirm this or am I doing it wrong?
Bests,
Michael