@@ -369,15 +369,15 @@ void TGLPadPainter::DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
369369 return ;
370370 }
371371
372- const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , gVirtualX -> GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE );
372+ const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , GetAttLine (). GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE , & GetAttLine () );
373373
374374 glBegin (GL_LINES);
375375 glVertex2d (x1, y1);
376376 glVertex2d (x2, y2);
377377 glEnd ();
378378
379- if (gVirtualX -> GetLineWidth () > lineWidthTS) {
380- Double_t pointSize = gVirtualX -> GetLineWidth ();
379+ if (GetAttLine (). GetLineWidth () > lineWidthTS) {
380+ Double_t pointSize = GetAttLine (). GetLineWidth ();
381381 if (pointSize > fLimits .GetMaxPointSize ())
382382 pointSize = fLimits .GetMaxPointSize ();
383383 glPointSize ((GLfloat)pointSize);
@@ -412,7 +412,7 @@ void TGLPadPainter::DrawLineNDC(Double_t u1, Double_t v1, Double_t u2, Double_t
412412 return ;
413413 }
414414
415- const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , gVirtualX -> GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE );
415+ const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , GetAttLine (). GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE , & GetAttLine () );
416416 const Double_t xRange = gPad ->GetX2 () - gPad ->GetX1 ();
417417 const Double_t yRange = gPad ->GetY2 () - gPad ->GetY1 ();
418418
@@ -429,22 +429,22 @@ void TGLPadPainter::DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2,
429429{
430430 if (fLocked ) return ;
431431
432- if (IsGradientFill (gVirtualX -> GetFillColor ())) {
432+ if (IsGradientFill (GetAttFill (). GetFillColor ())) {
433433 Double_t xs[] = {x1, x2, x2, x1};
434434 Double_t ys[] = {y1, y1, y2, y2};
435435 DrawPolygonWithGradient (4 , xs, ys);
436436 return ;
437437 }
438438
439439 if (mode == kHollow ) {
440- const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , 0 , fLimits .GetMaxLineWidth (), kTRUE );
440+ const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , 0 , fLimits .GetMaxLineWidth (), kTRUE , & GetAttLine () );
441441 //
442442 glPolygonMode (GL_FRONT_AND_BACK, GL_LINE);
443443 glRectd (x1, y1, x2, y2);
444444 glPolygonMode (GL_FRONT_AND_BACK, GL_FILL);
445445 glLineWidth (1 .f );
446446 } else {
447- const Rgl::Pad::FillAttribSet fillAttribs (fSSet , kFALSE );// Set filling parameters.
447+ const Rgl::Pad::FillAttribSet fillAttribs (fSSet , kFALSE , & GetAttFill () );// Set filling parameters.
448448 glRectd (x1, y1, x2, y2);
449449 }
450450}
@@ -466,15 +466,15 @@ void TGLPadPainter::DrawFillArea(Int_t n, const Double_t *x, const Double_t *y)
466466 return ;
467467 }
468468
469- if (IsGradientFill (gVirtualX -> GetFillColor ()))
469+ if (IsGradientFill (GetAttFill (). GetFillColor ()))
470470 return DrawPolygonWithGradient (n, x, y);
471471
472- if (!gVirtualX -> GetFillStyle ()) {
472+ if (!GetAttFill (). GetFillStyle ()) {
473473 fIsHollowArea = kTRUE ;
474474 return DrawPolyLine (n, x, y);
475475 }
476476
477- const Rgl::Pad::FillAttribSet fillAttribs (fSSet , kFALSE );
477+ const Rgl::Pad::FillAttribSet fillAttribs (fSSet , kFALSE , & GetAttFill () );
478478 DrawTesselation (n, x, y);
479479}
480480
@@ -486,7 +486,7 @@ void TGLPadPainter::DrawFillArea(Int_t n, const Float_t *x, const Float_t *y)
486486{
487487 if (fLocked ) return ;
488488
489- if (!gVirtualX -> GetFillStyle ()) {
489+ if (!GetAttFill (). GetFillStyle ()) {
490490 fIsHollowArea = kTRUE ;
491491 return DrawPolyLine (n, x, y);
492492 }
@@ -498,7 +498,7 @@ void TGLPadPainter::DrawFillArea(Int_t n, const Float_t *x, const Float_t *y)
498498 fVs [i * 3 + 1 ] = y[i];
499499 }
500500
501- const Rgl::Pad::FillAttribSet fillAttribs (fSSet , kFALSE );
501+ const Rgl::Pad::FillAttribSet fillAttribs (fSSet , kFALSE , & GetAttFill () );
502502
503503 GLUtesselator *t = (GLUtesselator *)fTess .GetTess ();
504504 gluBeginPolygon (t);
@@ -518,7 +518,7 @@ void TGLPadPainter::DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)
518518{
519519 if (fLocked ) return ;
520520
521- const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , gVirtualX -> GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE );
521+ const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , GetAttLine (). GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE , & GetAttLine () );
522522
523523 glBegin (GL_LINE_STRIP);
524524
@@ -531,8 +531,8 @@ void TGLPadPainter::DrawPolyLine(Int_t n, const Double_t *x, const Double_t *y)
531531 }
532532 glEnd ();
533533
534- if (gVirtualX -> GetLineWidth () > lineWidthTS) {
535- Double_t pointSize = gVirtualX -> GetLineWidth ();
534+ if (GetAttLine (). GetLineWidth () > lineWidthTS) {
535+ Double_t pointSize = GetAttLine (). GetLineWidth ();
536536 if (pointSize > fLimits .GetMaxPointSize ())
537537 pointSize = fLimits .GetMaxPointSize ();
538538 glPointSize ((GLfloat)pointSize);
@@ -555,7 +555,7 @@ void TGLPadPainter::DrawPolyLine(Int_t n, const Float_t *x, const Float_t *y)
555555{
556556 if (fLocked ) return ;
557557
558- const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , gVirtualX -> GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE );
558+ const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , GetAttLine (). GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE , & GetAttLine () );
559559
560560 glBegin (GL_LINE_STRIP);
561561
@@ -577,7 +577,7 @@ void TGLPadPainter::DrawPolyLineNDC(Int_t n, const Double_t *u, const Double_t *
577577{
578578 if (fLocked ) return ;
579579
580- const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , gVirtualX -> GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE );
580+ const Rgl::Pad::LineAttribSet lineAttribs (kTRUE , GetAttLine (). GetLineStyle (), fLimits .GetMaxLineWidth (), kTRUE , & GetAttLine () );
581581 const Double_t xRange = gPad ->GetX2 () - gPad ->GetX1 ();
582582 const Double_t yRange = gPad ->GetY2 () - gPad ->GetY1 ();
583583 const Double_t x1 = gPad ->GetX1 (), y1 = gPad ->GetY1 ();
@@ -637,15 +637,15 @@ void TGLPadPainter::DrawPolyMarker()
637637 const TGLEnableGuard blendGuard (GL_BLEND);
638638
639639 Float_t rgba[4 ] = {};
640- Rgl::Pad::ExtractRGBA (gVirtualX -> GetMarkerColor (), rgba);
640+ Rgl::Pad::ExtractRGBA (GetAttMarker (). GetMarkerColor (), rgba);
641641 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
642642 glColor4fv (rgba);
643643
644- const Width_t w = TMath::Max (1 , Int_t (TAttMarker::GetMarkerLineWidth (gVirtualX -> GetMarkerStyle ())));
644+ const Width_t w = TMath::Max (1 , Int_t (TAttMarker::GetMarkerLineWidth (GetAttMarker (). GetMarkerStyle ())));
645645 glLineWidth (w > fLimits .GetMaxLineWidth () ? fLimits .GetMaxLineWidth () : !w ? 1 .f : w);
646646
647647 const TPoint *xy = &fPoly [0 ];
648- const Style_t markerStyle = TAttMarker::GetMarkerStyleBase (gVirtualX -> GetMarkerStyle ());
648+ const Style_t markerStyle = TAttMarker::GetMarkerStyleBase (GetAttMarker (). GetMarkerStyle ());
649649 const UInt_t n = UInt_t (fPoly .size ());
650650 switch (markerStyle) {
651651 case kDot :
@@ -1069,10 +1069,8 @@ void TGLPadPainter::DrawPolygonWithGradient(Int_t n, const Double_t *x, const Do
10691069 assert (x != nullptr && " DrawPolygonWithGradient, parameter 'x' is null" );
10701070 assert (y != nullptr && " DrawPolygonWithGradient, parameter 'y' is null" );
10711071
1072- assert (dynamic_cast <TColorGradient *>(gROOT ->GetColor (gVirtualX ->GetFillColor ())) != nullptr &&
1073- " DrawPolygonWithGradient, the current fill color is not a gradient fill" );
1074- const TColorGradient * const grad =
1075- dynamic_cast <TColorGradient *>(gROOT ->GetColor (gVirtualX ->GetFillColor ()));
1072+ auto grad = dynamic_cast <TColorGradient *>(gROOT ->GetColor (GetAttFill ().GetFillColor ()));
1073+ assert (grad != nullptr && " DrawPolygonWithGradient, the current fill color is not a gradient fill" );
10761074
10771075 if (fLocked )
10781076 return ;
0 commit comments