@@ -641,9 +641,12 @@ void TGLPadPainter::DrawPolyMarker()
641641 glBlendFunc (GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
642642 glColor4fv (rgba);
643643
644+
644645 const Width_t w = TMath::Max (1 , Int_t (TAttMarker::GetMarkerLineWidth (GetAttMarker ().GetMarkerStyle ())));
645646 glLineWidth (w > fLimits .GetMaxLineWidth () ? fLimits .GetMaxLineWidth () : !w ? 1 .f : w);
646647
648+ fMarker .SetMarkerSizeWidth (GetAttMarker ().GetMarkerSize (), w);
649+
647650 const TPoint *xy = &fPoly [0 ];
648651 const Style_t markerStyle = TAttMarker::GetMarkerStyleBase (GetAttMarker ().GetMarkerStyle ());
649652 const UInt_t n = UInt_t (fPoly .size ());
@@ -781,21 +784,23 @@ void TGLPadPainter::DrawTextHelper(Double_t x, Double_t y, const Char *text, ETe
781784 glMatrixMode (GL_MODELVIEW);
782785
783786 Float_t rgba[4 ] = {};
784- Rgl::Pad::ExtractRGBA (gVirtualX -> GetTextColor (), rgba);
787+ Rgl::Pad::ExtractRGBA (GetAttText (). GetTextColor (), rgba);
785788 glColor4fv (rgba);
786789
787790 // 10 is the first valid font index.
788791 // 20 is FreeSerifBold, as in TTF.cxx and in TGLFontManager.cxx.
789792 // shift - is the shift to access "extended" fonts.
790793 const Int_t shift = TGLFontManager::GetExtendedFontStartIndex ();
791794
792- Int_t fontIndex = TMath::Max (Short_t (10 ), gVirtualX -> GetTextFont ());
795+ Int_t fontIndex = TMath::Max (Short_t (10 ), GetAttText (). GetTextFont ());
793796 if (fontIndex / 10 + shift > TGLFontManager::GetFontFileArray ()->GetEntries ())
794797 fontIndex = 20 + shift * 10 ;
795798 else
796799 fontIndex += shift * 10 ;
797800
798- fFM .RegisterFont (TMath::Max (Int_t (gVirtualX ->GetTextSize ()) - 1 , 10 ),// kTexture does not work if size < 10.
801+ fF .SetTextAlign (GetAttText ().GetTextAlign ());
802+
803+ fFM .RegisterFont (TMath::Max (Int_t (GetAttText ().GetTextSize ()) - 1 , 10 ),// kTexture does not work if size < 10.
799804 TGLFontManager::GetFontNameFromId (fontIndex),
800805 TGLFont::kTexture , fF );
801806 fF .PreRender ();
@@ -819,7 +824,7 @@ void TGLPadPainter::DrawText(Double_t x, Double_t y, const char *text, ETextMode
819824{
820825 if (fLocked ) return ;
821826
822- if (!gVirtualX -> GetTextSize ())
827+ if (!GetAttText (). GetTextSize ())
823828 return ;
824829
825830 DrawTextHelper (x, y, text, mode);
@@ -835,7 +840,7 @@ void TGLPadPainter::DrawText(Double_t x, Double_t y, const wchar_t *text, ETextM
835840{
836841 if (fLocked ) return ;
837842
838- if (!gVirtualX -> GetTextSize ())
843+ if (!GetAttText (). GetTextSize ())
839844 return ;
840845
841846 DrawTextHelper (x, y, text, mode);
0 commit comments