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.
Currently I don’t have an example but I will file one after the weekend.
The problem occurs in connection with “bug-getting-transparent-color” (my other issue) where many many objects are drawn with a transparent color. Because every transparent color gets a new color index this leads to high color indexes and therefore to an overflow at the short parameter.