Skip to content

Commit a8d19c8

Browse files
committed
Fix problem with color redeclaration when store TASImage
Use method to get white color
1 parent a004c57 commit a8d19c8

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

graf2d/asimage/src/TASImage.cxx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1613,13 +1613,7 @@ void TASImage::Paint(Option_t *option)
16131613
}
16141614

16151615
// get special color cell to be reused during image printing
1616-
TObjArray *colors = (TObjArray*) gROOT->GetListOfColors();
1617-
TColor *color = nullptr;
1618-
// Look for color by name
1619-
if ((color = (TColor*)colors->FindObject("Image_PS")) == nullptr)
1620-
color = new TColor(colors->GetEntries(), 1., 1., 1., "Image_PS");
1621-
1622-
gVirtualPS->SetFillColor(color->GetNumber());
1616+
gVirtualPS->SetFillColor(TColor::GetColor((Float_t) 1., (Float_t) 1., (Float_t) 1.));
16231617
gVirtualPS->SetFillStyle(1001);
16241618

16251619
gVirtualPS->CellArrayBegin(image->width, image->height, x1, x2, y1, y2);

0 commit comments

Comments
 (0)