Changeset 2566 for trunk/MagicSoft/Mars/mhist
- Timestamp:
- 11/24/03 01:34:31 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Mars/mhist/MHCamera.cc
r2563 r2566 465 465 max += 1; 466 466 467 if (!TestBit(kNoLegend)) 468 UpdateLegend(min, max, islog); 467 UpdateLegend(min, max, islog); 469 468 470 469 MHexagon hex; … … 670 669 } 671 670 671 // FIXME: Should depend on the color of the pixel... 672 //(GetColor(GetBinContent(i+1), min, max, 0)); 673 txt.SetTextColor(kRed); 672 674 txt.SetTextSize(0.3*h.GetD()/fGeomCam->GetMaxRadius()/1.05); 673 675 txt.PaintText(h.GetX(), h.GetY(), num); … … 926 928 void MHCamera::UpdateLegend(Float_t min, Float_t max, Bool_t islog) 927 929 { 930 const Float_t range = fGeomCam->GetMaxRadius()*1.05; 931 932 TArrow arr; 933 arr.PaintArrow(-range*.9, -range*.9, -range*.6, -range*.9, 0.025); 934 arr.PaintArrow(-range*.9, -range*.9, -range*.9, -range*.6, 0.025); 935 936 TString text; 937 text += (int)(range*.3); 938 text += "mm"; 939 940 TText newtxt2; 941 newtxt2.SetTextSize(0.04); 942 newtxt2.PaintText(-range*.85, -range*.85, text); 943 944 text = ""; 945 text += (float)((int)(range*.3*fGeomCam->GetConvMm2Deg()*10))/10; 946 text += "\\circ"; 947 text = text.Strip(TString::kLeading); 948 949 TLatex latex; 950 latex.PaintLatex(-range*.85, -range*.75, 0, 0.04, text); 951 952 if (TestBit(kNoLegend)) 953 return; 954 928 955 TPaveStats *stats = GetStatisticBox(); 929 956 930 957 const Float_t hndc = 0.92 - (stats ? stats->GetY1NDC() : 1); 931 const Float_t range = fGeomCam->GetMaxRadius()*1.05;932 958 const Float_t H = (0.75-hndc)*range; 933 959 const Float_t offset = hndc*range; … … 966 992 newbox.PaintBox(range, H*(i*h-1)-offset, range+w, H*((i+1)*h-1)-offset); 967 993 } 968 969 TArrow arr;970 arr.PaintArrow(-range*.9, -range*.9, -range*.6, -range*.9, 0.025);971 arr.PaintArrow(-range*.9, -range*.9, -range*.9, -range*.6, 0.025);972 973 TString text;974 text += (int)(range*.3);975 text += "mm";976 977 TText newtxt2;978 newtxt2.SetTextSize(0.04);979 newtxt2.PaintText(-range*.85, -range*.85, text);980 981 text = "";982 text += (float)((int)(range*.3*fGeomCam->GetConvMm2Deg()*10))/10;983 text += "\\circ";984 text = text.Strip(TString::kLeading);985 986 TLatex latex;987 latex.PaintLatex(-range*.85, -range*.75, 0, 0.04, text);988 994 } 989 995
Note:
See TracChangeset
for help on using the changeset viewer.