443 ((
TLatex&)text).Copy(*
this);
453 TAttLine::operator=(lt);
478 ((
TLatex&)obj).fTabSize = 0;
524 const char *tab[] = {
"alpha",
"beta",
"chi",
"delta",
"varepsilon",
"phi",
"gamma",
"eta",
"iota",
"varphi",
"kappa",
"lambda",
525 "mu",
"nu",
"omicron",
"pi",
"theta",
"rho",
"sigma",
"tau",
"upsilon",
"varomega",
"omega",
"xi",
"psi",
"zeta",
526 "Alpha",
"Beta",
"Chi",
"Delta",
"Epsilon",
"Phi",
"Gamma",
"Eta",
"Iota",
"vartheta",
527 "Kappa",
"Lambda",
"Mu",
"Nu",
"Omicron",
"Pi",
"Theta",
"Rho",
"Sigma",
"Tau",
528 "Upsilon",
"varsigma",
"Omega",
"Xi",
"Psi",
"Zeta",
"varUpsilon",
"epsilon"};
530 const char *
tab2[] = {
"leq",
"/",
"infty",
"voidb",
"club",
"diamond",
"heart",
531 "spade",
"leftrightarrow",
"leftarrow",
"uparrow",
"rightarrow",
532 "downarrow",
"circ",
"pm",
"doublequote",
"geq",
"times",
"propto",
533 "partial",
"bullet",
"divide",
"neq",
"equiv",
"approx",
"3dots",
534 "cbar",
"topbar",
"downleftarrow",
"aleph",
"Jgothic",
"Rgothic",
"voidn",
535 "otimes",
"oplus",
"oslash",
"cap",
"cup",
"supset",
"supseteq",
536 "notsubset",
"subset",
"subseteq",
"in",
"notin",
"angle",
"nabla",
537 "oright",
"ocopyright",
"trademark",
"prod",
"surd",
"upoint",
"corner",
"wedge",
538 "vee",
"Leftrightarrow",
"Leftarrow",
"Uparrow",
"Rightarrow",
539 "Downarrow",
"diamond",
"LT",
"void1",
"copyright",
"void3",
"sum",
540 "arctop",
"lbar",
"arcbottom",
"topbar",
"void8",
"bottombar",
"arcbar",
541 "ltbar",
"AA",
"aa",
"void06",
"GT",
"int",
"forall",
"exists" };
543 const char *
tab3[] = {
"bar",
"vec",
"dot",
"hat",
"ddot",
"acute",
"grave",
"check",
"tilde",
"slash"};
547 Int_t nBlancDeb=0,nBlancFin=0,l_nBlancDeb=0,l_nBlancFin=0;
560 if (nBlancDeb==l_nBlancDeb && nBlancFin==l_nBlancFin) cont =
kFALSE;
563 if (t[nBlancDeb]==
'{' && t[length-nBlancFin-1]==
'}') {
566 for(i=nBlancDeb;i<length-nBlancFin;i++) {
567 if (t[i] ==
'{' && !(i>0 && t[i-1] ==
'@')) nBrackets++;
568 if (t[i] ==
'}' && t[i-1]!=
'@') nBrackets--;
569 if (nBrackets==0 && i<length-nBlancFin-2) {
585 l_nBlancDeb = nBlancDeb;
586 l_nBlancFin = nBlancFin;
591 length -= nBlancFin+nBlancDeb;
593 strncpy(text,t+nBlancDeb,length);
599 indiceSize = spec.
fSize;
602 specNewSize.
fSize = indiceSize;
611 Int_t opCurlyCurly = -1;
612 Int_t opSquareCurly = -1;
613 Int_t opCloseCurly = -2;
620 Int_t opSquareBracket = 0 ;
621 Int_t opBigCurly = 0 ;
624 Int_t abovePlace = 0 ;
632 Int_t opBackslash = 0;
633 Int_t opParallel = 0;
634 Int_t opSplitLine = -1;
644 for(i=0;i<length;i++) {
646 case '\'' : quote1 = !quote1 ; break ;
647 case '"' : quote2 = !quote2 ; break ;
653 if (!(i>0 && text[i-1] ==
'@')) nBrackets++;
658 if (!(i>0 && text[i-1] ==
'@')) nBrackets--;
660 if (i<length-1)
if (text[i+1]==
'{' && opCurlyCurly==-1) opCurlyCurly=i;
662 if (text[i+1]!=
'{' && !(text[i+2]==
'{' && (text[i+1]==
'^' || text[i+1]==
'_'))
663 && opCloseCurly==-2) opCloseCurly=i;
665 else if (i<length-1) {
666 if (text[i+1]!=
'{' && opCloseCurly==-2) opCloseCurly=i;
668 else if (opCloseCurly==-2) opCloseCurly=i;
674 if (!(i>0 && text[i-1] ==
'@')) nCroch++;
679 if (!(i>0 && text[i-1] ==
'@')) nCroch--;
691 strncpy(buf,&text[i],2);
692 if (strncmp(buf,
"^{",2)==0) {
693 if (opPower==-1 && nBrackets==0 && nCroch==0) opPower=i;
696 strncpy(buf1,&text[i-4],4);
697 if (strncmp(buf1,
"#int",4)==0) {
699 if (i>4 && opCloseCurly==-2) opCloseCurly=i-5;
701 if (strncmp(buf1,
"#sum",4)==0) {
703 if (i>4 && opCloseCurly==-2) opCloseCurly=i-5;
707 if (strncmp(buf,
"_{",2)==0) {
708 if (opUnder==-1 && nBrackets==0 && nCroch==0) opUnder=i;
711 strncpy(buf2,&text[i-4],4);
712 if (strncmp(buf2,
"#int",4)==0) {
714 if (i>4 && opCloseCurly==-2) opCloseCurly=i-5;
716 if (strncmp(buf2,
"#sum",4)==0) {
718 if (i>4 && opCloseCurly==-2) opCloseCurly=i-5;
722 if (strncmp(buf,
"]{",2)==0)
723 if (opSquareCurly==-1 && nBrackets==0 && nCroch==0) opSquareCurly=i;
726 if (text[i]==
'\\' || (text[i]==
'#' && !opFound && nBrackets==0 && nCroch==0)) {
730 strncpy(buf,&text[i+1],10);
731 if (strncmp(buf,
"splitline{",10)==0) {
732 opSplitLine=i; opFound =
kTRUE;
733 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
739 strncpy(buf,&text[i+1],9);
740 if (!opBackslash && strncmp(buf,
"backslash",9)==0) {
741 opBackslash=1; opFound =
kTRUE;
742 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
748 strncpy(buf,&text[i+1],8);
749 if (!opParallel && strncmp(buf,
"parallel",8)==0) {
750 opParallel=1; opFound =
kTRUE;
751 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
757 strncpy(buf,&text[i+1],6);
758 if (strncmp(buf,
"lower[",6)==0 || strncmp(buf,
"lower{",6)==0) {
759 opLower=i; opFound =
kTRUE;
760 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
763 if (strncmp(buf,
"scale[",6)==0 || strncmp(buf,
"scale{",6)==0) {
764 opScale=i; opFound =
kTRUE;
765 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
768 if (strncmp(buf,
"color[",6)==0 || strncmp(buf,
"color{",6)==0) {
769 opColor=i; opFound =
kTRUE;
770 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
776 strncpy(buf,&text[i+1],5);
777 if (strncmp(buf,
"frac{",5)==0) {
778 opFrac=i; opFound =
kTRUE;
779 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
782 if (strncmp(buf,
"sqrt{",5)==0 || strncmp(buf,
"sqrt[",5)==0) {
783 opSqrt=i; opFound =
kTRUE;
784 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
787 if (strncmp(buf,
"font{",5)==0 || strncmp(buf,
"font[",5)==0) {
788 opFont=i; opFound =
kTRUE;
789 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
792 if (strncmp(buf,
"kern[",5)==0 || strncmp(buf,
"kern{",5)==0) {
793 opKern=i; opFound =
kTRUE;
794 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
797 if (!opMinus && strncmp(buf,
"minus",5)==0) {
798 opMinus=1; opFound =
kTRUE;
799 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
802 if (strncmp(buf,
"mbox[",5)==0 || strncmp(buf,
"mbox{",5)==0) {
803 opMbox=i; opFound =
kTRUE;
804 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
810 strncpy(buf,&text[i+1],4);
811 if (!opOdot && strncmp(buf,
"odot",4)==0) {
812 opOdot=1; opFound =
kTRUE;
813 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
816 if (!opHbar && strncmp(buf,
"hbar",4)==0) {
817 opHbar=1; opFound =
kTRUE;
818 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
821 if (!opPerp && strncmp(buf,
"perp",4)==0) {
822 opPerp=1; opFound =
kTRUE;
823 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
826 if (!opPlus && strncmp(buf,
"plus",4)==0) {
827 opPlus=1; opFound =
kTRUE;
828 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
834 strncpy(buf,&text[i+1],3);
836 if (strncmp(buf,
"[]{",3)==0) {
837 opSquareBracket=1; opFound =
kTRUE;
838 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
841 if (strncmp(buf,
"{}{",3)==0 ) {
842 opBigCurly=1; opFound =
kTRUE;
843 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
846 if (strncmp(buf,
"||{",3)==0) {
847 opAbs=1; opFound =
kTRUE;
848 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
851 if (strncmp(buf,
"(){",3)==0) {
852 opParen=1; opFound =
kTRUE;
853 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
856 if (!opBox && strncmp(buf,
"Box",3)==0) {
857 opBox=1; opFound =
kTRUE;
858 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
861 if (strncmp(buf,
"bf[",3)==0 || strncmp(buf,
"bf{",3)==0) {
862 opBf=i; opFound =
kTRUE;
863 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
866 if (strncmp(buf,
"it[",3)==0 || strncmp(buf,
"it{",3)==0) {
867 opIt=i; opFound =
kTRUE;
868 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
874 strncpy(buf,&text[i+1],2);
875 if (!opMp && strncmp(buf,
"mp",2)==0) {
876 opMp=1; opFound =
kTRUE;
877 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
882 if (!opFound &&
UInt_t(length)>i+strlen(tab[k])) {
883 if (strncmp(&text[i+1],tab[k],strlen(tab[k]))==0) {
886 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
891 if (!opFound &&
UInt_t(length)>i+strlen(tab3[k])) {
892 if (strncmp(&text[i+1],tab3[k],strlen(tab3[k]))==0) {
895 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
902 if ((opSpec==-1 || strlen(tab2[k])>lastsize) &&
UInt_t(length)>i+strlen(tab2[k])) {
903 if (strncmp(&text[i+1],tab2[k],strlen(tab2[k]))==0) {
904 lastsize = strlen(tab2[k]);
907 if (i>0 && opCloseCurly==-2) opCloseCurly=i-1;
920 if (opCloseCurly>-1 && opCloseCurly<length-1) {
922 fs1 =
Anal1(spec,text,opCloseCurly+1);
923 fs2 =
Anal1(spec,text+opCloseCurly+1,length-opCloseCurly-1);
927 Analyse(x+fs1.
Width(),
y,spec,text+opCloseCurly+1,length-opCloseCurly-1);
928 Analyse(x,y,spec,text,opCloseCurly+1);
933 else if (opPower>-1 && opUnder>-1) {
938 switch (abovePlace) {
940 prop = .8 ; propU = 1.75 ;
943 prop = .9 ; propU = 1.75 ;
952 if (min >= 2 && strncmp(&text[min-2],
"{}",2)==0) {
955 snprintf(&text[ltext-2],length-(ltext-2),
"I ") ;
958 fs1 =
Anal1(spec,text,ltext);
959 fs2 =
Anal1(specNewSize,text+min+1,max-min-1);
960 fs3 =
Anal1(specNewSize,text+max+1,length-max-1);
971 if (opPower<opUnder) {
978 Analyse(x+addW,y+addH2,specNewSize,text+max+1,length-max-1);
979 Analyse(x+addW,y+addH1,specNewSize,text+min+1,max-min-1);
981 Double_t addW1, addW2, addH1, addH2;
983 pos = (m-fs1.
Width())/2;
984 if (opPower<opUnder) {
986 addW1 = (m-fs2.
Width())/2;
988 addW2 = (m-fs3.
Width())/2;
991 addW1 = (m-fs2.
Width())/2;
993 addW2 = (m-fs3.
Width())/2;
996 Analyse(x+addW2,y+addH2,specNewSize,text+max+1,length-max-1);
997 Analyse(x+addW1,y+addH1,specNewSize,text+min+1,max-min-1);
1000 if (min >= 2 && strncmp(&text[min-2],
"{}",2)==0) {
1001 snprintf(&text[min-2],length-(min-2),
" ") ;
1002 Analyse(x+pos,y,spec,text,min-1);
1004 Analyse(x+pos,y,spec,text,min);
1009 if (opPower<opUnder) {
1019 if (opPower<opUnder) {
1028 else if (opPower>-1) {
1031 switch (abovePlace) {
1033 prop = 1.75 ; break ;
1035 prop = 1.75; break ;
1039 Int_t ltext = opPower ;
1040 if (ltext >= 2 && strncmp(&text[ltext-2],
"{}",2)==0) {
1043 snprintf(&text[ltext-2],length-(ltext-2),
"I ") ;
1046 fs1 =
Anal1(spec,text,ltext);
1047 fs2 =
Anal1(specNewSize,text+opPower+1,length-opPower-1);
1056 if (over <= 0) over = 1.5*fs2.
Over();
1065 Analyse(x+pos2,y-fs1.
Over()*prop-fs2.
Under(),specNewSize,text+opPower+1,length-opPower-1);
1067 if (opPower >= 2 && strncmp(&text[opPower-2],
"{}",2)==0) {
1068 snprintf(&text[opPower-2],length-(opPower-2),
" ") ;
1069 Analyse(x+pos,y,spec,text,opPower-1);
1071 Analyse(x+pos,y,spec,text,opPower);
1082 else if (opUnder>-1) {
1088 Int_t ltext = opUnder ;
1089 if (ltext >= 2 && strncmp(&text[ltext-2],
"{}",2)==0) {
1092 snprintf(&text[ltext-2],length-(ltext-2),
"I ") ;
1095 fs1 =
Anal1(spec,text,ltext);
1096 fs2 =
Anal1(specNewSize,text+opUnder+1,length-opUnder-1);
1104 Analyse(x+fs1.
Width()+xfpos,y+fs1.
Under()+fs2.
Over()*fpos,specNewSize,text+opUnder+1,length-opUnder-1);
1112 Analyse(x+pos2,y+fs1.
Under()*prop+fs2.
Over(),specNewSize,text+opUnder+1,length-opUnder-1);
1114 if (opUnder >= 2 && strncmp(&text[opUnder-2],
"{}",2)==0) {
1115 snprintf(&text[opUnder-2],length-(opUnder-2),
" ") ;
1116 Analyse(x+pos,y,spec,text,opUnder-1);
1118 Analyse(x+pos,y,spec,text,opUnder);
1130 fs1 =
Anal1(spec,text+4,length-4);
1132 fs1 =
Analyse(x+square,y,spec,text+4,length-4);
1148 fs1 =
Anal1(spec,text+5,length-5);
1150 fs1 =
Analyse(x+1.3*square,y,spec,text+5,length-5);
1162 fs1 =
Anal1(spec,text+5,length-5);
1164 fs1 =
Analyse(x+square,y,spec,text+5,length-5);
1177 DrawLine(x,y-0.8*square,x+0.75*square,y-square,spec);
1184 fs1 =
Anal1(spec,text+6,length-6);
1186 fs1 =
Analyse(x+square,y,spec,text+6,length-6);
1205 fs1 =
Anal1(spec,text+5,length-5);
1207 fs1 =
Analyse(x+square,y,spec,text+5,length-5);
1226 fs1 =
Anal1(spec,text+3,length-3);
1228 fs1 =
Analyse(x+square,y,spec,text+3,length-3);
1247 fs1 =
Anal1(spec,text+5,length-5);
1249 fs1 =
Analyse(x+0.5*square,y,spec,text+5,length-5);
1260 else if (opBackslash) {
1263 fs1 =
Anal1(spec,text+10,length-10);
1265 fs1 =
Analyse(x+square,y,spec,text+10,length-10);
1281 else if (opParallel) {
1284 fs1 =
Anal1(spec,text+9,length-9);
1286 fs1 =
Analyse(x+0.5*square,y,spec,text+9,length-9);
1296 else if (opGreek>-1) {
1299 char letter = 97 + opGreek;
1301 if (opGreek>25) letter -= 58;
1302 if (opGreek == 52) letter =
'\241';
1303 if (opGreek == 53) letter =
'\316';
1305 fs1 =
Anal1(newSpec,&letter,1);
1306 fs2 =
Anal1(spec,text+strlen(tab[opGreek])+1,length-strlen(tab[opGreek])-1);
1310 Analyse(x+fs1.
Width(),
y,spec,text+strlen(tab[opGreek])+1,length-strlen(tab[opGreek])-1);
1311 Analyse(x,y-yoffset,newSpec,&letter,1);
1317 else if (opSpec>-1) {
1320 char letter =
'\243' + opSpec;
1321 if(opSpec == 75 || opSpec == 76) {
1323 if (
gVirtualX->InheritsFrom(
"TGCocoa")) {
1324 if (opSpec == 75) letter =
'\201';
1325 if (opSpec == 76) letter =
'\214';
1327 if (opSpec == 75) letter =
'\305';
1328 if (opSpec == 76) letter =
'\345';
1331 if(opSpec == 80 || opSpec == 81) {
1332 if (opSpec == 80) letter =
'\042';
1333 if (opSpec == 81) letter =
'\044';
1341 }
else if (opSpec==79) {
1345 fs1 =
Anal1(newSpec,&letter,1);
1346 if (opSpec == 79 || opSpec == 66)
1349 fs2 =
Anal1(spec,text+strlen(tab2[opSpec])+1,length-strlen(tab2[opSpec])-1);
1353 Analyse(x+fs1.
Width(),
y,spec,text+strlen(tab2[opSpec])+1,length-strlen(tab2[opSpec])-1);
1354 if (opSpec!=66 && opSpec!=79)
1355 Analyse(x,y,newSpec,&letter,1);
1362 else if (opAbove>-1) {
1364 fs1 =
Anal1(spec,text+strlen(tab3[opAbove])+1,length-strlen(tab3[opAbove])-1);
1368 Analyse(x,y,spec,text+strlen(tab3[opAbove])+1,length-strlen(tab3[opAbove])-1);
1374 ypos = y-fs1.
Over()-sub ;
1379 y0 = y-sub-fs1.
Over() ;
1381 x1 = x+fs1.
Width() ;
1387 x1 = x+fs1.
Width()/2-3*sub/4 ;
1388 x2 = x+fs1.
Width()/2+3*sub/4 ;
1389 y1 = y-sub-fs1.
Over() ;
1393 x2 = x+fs1.
Width()/2 ;
1396 x1 = x2-fs1.
Width()/3 ;
1397 x3 = x2+fs1.
Width()/3 ;
1402 x1 = x+fs1.
Width()/2-9*sub/4 ;
1403 x2 = x+fs1.
Width()/2-3*sub/4 ;
1404 x3 = x+fs1.
Width()/2+9*sub/4 ;
1405 x4 = x+fs1.
Width()/2+3*sub/4 ;
1406 y1 = y-sub-fs1.
Over() ;
1411 x1 = x+fs1.
Width()/2;
1412 y1 = y +sub -fs1.
Over() ;
1418 x1 = x+fs1.
Width()/2-sub;
1419 y1 = y-sub-fs1.
Over() ;
1425 x1 = x+fs1.
Width()/2 ;
1428 y1 = y-sub-fs1.
Over() ;
1433 x2 = x+fs1.
Width()/2 ;
1434 y2 = y -fs1.
Over() ;
1441 if (
gVirtualX->InheritsFrom(
"TGCocoa")) y2 -= 4.7*sub;
1446 Double_t xx =
gPad->AbsPixeltoX(
Int_t((x2-xOrigin)*cosang+(y2-yOrigin)*sinang+xOrigin));
1447 Double_t yy =
gPad->AbsPixeltoY(
Int_t((x2-xOrigin)*-sinang+(y2-yOrigin)*cosang+yOrigin));
1458 xx =
gPad->AbsPixeltoX(
Int_t((x2-xOrigin)*cosang+(y22-yOrigin)*sinang+xOrigin));
1459 yy =
gPad->AbsPixeltoY(
Int_t((x2-xOrigin)*-sinang+(y22-yOrigin)*cosang+yOrigin));
1466 x1 = x + 0.8*fs1.
Width();
1467 y1 = y -fs1.
Over() ;
1468 x2 = x + 0.3*fs1.
Width();
1469 y2 = y1 + 1.2*fs1.
Height();
1475 if (opAbove==1) div=4;
1478 else if (opSquareBracket) {
1482 fs1 =
Anal1(spec,text+3,length-3);
1486 Analyse(x+l2+l,y,spec,text+3,length-3);
1498 Double_t radius2,radius1 , dw, l2 = l/2 ;
1501 fs1 =
Anal1(spec,text+3,length-3);
1504 radius1 = radius2 * 2 / 3;
1509 radius1 = radius2 * 2 / 3;
1516 Analyse(x+3*l2+dw,y,spec,text+3,length-3);
1525 fs1 =
Anal1(spec,text+3,length-3);
1529 Analyse(x+l2+l,y,spec,text+3,length-3);
1535 else if (opBigCurly) {
1541 fs1 =
Anal1(spec,text+3,length-3);
1552 Analyse(x+l+ltip+l2,y,spec,text+3,length-3);
1555 DrawLine(x+l2+ltip,y-fs1.
Over(),x+l2+ltip,y2-ltip,spec);
1561 DrawLine(x+l2,y2,x+l2+ltip,y2-ltip,spec);
1562 DrawLine(x+l2,y2,x+l2+ltip,y2+ltip,spec);
1577 else if (opFrac>-1) {
1578 if (opCurlyCurly==-1) {
1580 fError =
"Missing denominator for #frac";
1585 fs1 =
Anal1(spec,text+opFrac+6,opCurlyCurly-opFrac-6);
1586 fs2 =
Anal1(spec,text+opCurlyCurly+2,length-opCurlyCurly-3);
1600 Analyse(x+addW2,y+fs2.
Over()-height,spec,text+opCurlyCurly+2,length-opCurlyCurly-3);
1601 Analyse(x+addW1,y-fs1.
Under()-3*height,spec,text+opFrac+6,opCurlyCurly-opFrac-6);
1609 else if (opSplitLine>-1) {
1610 if (opCurlyCurly==-1) {
1612 fError =
"Missing second line for #splitline";
1617 fs1 =
Anal1(spec,text+opSplitLine+11,opCurlyCurly-opSplitLine-11);
1618 fs2 =
Anal1(spec,text+opCurlyCurly+2,length-opCurlyCurly-3);
1624 Analyse(x,y+fs2.
Over()-height,spec,text+opCurlyCurly+2,length-opCurlyCurly-3);
1625 Analyse(x,y-fs1.
Under()-3*height,spec,text+opSplitLine+11,opCurlyCurly-opSplitLine-11);
1631 else if (opSqrt>-1) {
1633 if (opSquareCurly>-1) {
1635 fs1 =
Anal1(specNewSize,text+opSqrt+6,opSquareCurly-opSqrt-6);
1636 fs2 =
Anal1(spec,text+opSquareCurly+1,length-opSquareCurly-1);
1642 fs1 =
Anal1(spec,text+opSqrt+5,length-opSqrt-5);
1647 if (opSquareCurly>-1) {
1655 Analyse(x+pas2,y,spec,text+opSquareCurly+1,length-opSquareCurly-1);
1656 Analyse(x,y-fs2.
Over()-fs1.
Under(),specNewSize,text+opSqrt+6,opSquareCurly-opSqrt-6);
1676 DrawLine(x1-2*dx,y1,x1-dx,y2,spec);
1684 else if (opColor>-1) {
1685 if (opSquareCurly==-1) {
1687 fError =
"Missing color number. Syntax is #color[(Int_t)nb]{ ... }";
1692 strncpy(nb,text+opColor+7,opSquareCurly-opColor-7);
1693 nb[opSquareCurly-opColor-7] = 0;
1694 if (sscanf(nb,
"%d",&newSpec.
fColor) < 1) {
1697 fError =
"Invalid color number. Syntax is #color[(Int_t)nb]{ ... }";
1702 result =
Anal1(newSpec,text+opSquareCurly+1,length-opSquareCurly-1);
1704 Analyse(x,y,newSpec,text+opSquareCurly+1,length-opSquareCurly-1);
1707 else if (opFont>-1) {
1708 if (opSquareCurly==-1) {
1710 fError =
"Missing font number. Syntax is #font[nb]{ ... }";
1715 strncpy(nb,text+opFont+6,opSquareCurly-opFont-6);
1716 nb[opSquareCurly-opFont-6] = 0;
1717 if (sscanf(nb,
"%d",&newSpec.
fFont) < 1) {
1720 fError =
"Invalid font number. Syntax is #font[(Int_t)nb]{ ... }";
1725 result =
Anal1(newSpec,text+opSquareCurly+1,length-opSquareCurly-1);
1727 Analyse(x,y,newSpec,text+opSquareCurly+1,length-opSquareCurly-1);
1730 else if (opKern>-1) {
1731 if (opSquareCurly==-1) {
1733 fError =
"Missing horizontal shift number. Syntax is #kern[dx]{ ... }";
1737 strncpy(dxc,text+opKern+6,opSquareCurly-opKern-6);
1738 dxc[opSquareCurly-opKern-6] = 0;
1740 if (sscanf(dxc,
"%f",&dx) < 1) {
1743 fError =
"Invalid horizontal shift number. Syntax is #kern[(Float_t)dx]{ ... }";
1748 fs1 =
Anal1(spec,text+opSquareCurly+1,length-opSquareCurly-1);
1755 Analyse(x + ddx,y,spec,text+opSquareCurly+1,length-opSquareCurly-1);
1758 else if (opLower>-1) {
1759 if (opSquareCurly==-1) {
1761 fError =
"Missing vertical shift number. Syntax is #lower[dy]{ ... }";
1765 strncpy(dyc,text+opLower+7,opSquareCurly-opLower-7);
1766 dyc[opSquareCurly-opLower-7] = 0;
1768 if (sscanf(dyc,
"%f",&dy) < 1) {
1771 fError =
"Invalid vertical shift number. Syntax is #lower[(Float_t)dy]{ ... }";
1776 fs1 =
Anal1(spec,text+opSquareCurly+1,length-opSquareCurly-1);
1783 Analyse(x,y + ddy,spec,text+opSquareCurly+1,length-opSquareCurly-1);
1786 else if (opScale>-1) {
1787 if (opSquareCurly==-1) {
1789 fError =
"Missing scale factor. Syntax is #scale[(Double_t)nb]{ ... }";
1794 strncpy(nb,text+opScale+7,opSquareCurly-opScale-7);
1795 nb[opSquareCurly-opScale-7] = 0;
1796 if (sscanf(nb,
"%lf",&newSpec.
fSize) < 1) {
1799 fError =
"Invalid scale factor. Syntax is #factor[(Double_t)nb]{ ... }";
1805 result =
Anal1(newSpec,text+opSquareCurly+1,length-opSquareCurly-1);
1807 Analyse(x,y,newSpec,text+opSquareCurly+1,length-opSquareCurly-1);
1812 Int_t lut[] = {3, 13, 1, 6, 7, 4, 5, 10, 11, 8, 9, 12, 2, 14, 15};
1814 if ((fontId >= 1) && (fontId <= (
Int_t)(
sizeof(lut)/
sizeof(lut[0])))) fontId = lut[fontId-1];
1815 newSpec.
fFont = fontId*10 + newSpec.
fFont%10;
1817 fs1 =
Anal1(newSpec,text+3,length-3);
1821 Analyse(x,y,newSpec,text+3,length-3);
1825 else if (opMbox>-1) {
1828 fs1 =
Anal1(newSpec,text+5,length-5);
1832 Analyse(x,y,newSpec,text+5,length-5);
1838 Int_t lut[] = {13, 3, 2, 5, 4, 7, 6, 9, 8, 11, 10, 15, 1, 14, 12};
1840 if ((fontId >= 1) && (fontId <= (
Int_t)(
sizeof(lut)/
sizeof(lut[0])))) fontId = lut[fontId-1];
1841 newSpec.
fFont = fontId*10 + newSpec.
fFont%10;
1844 fs1 =
Anal1(newSpec,text+3,length-3);
1848 Analyse(x,y,newSpec,text+3,length-3);
1862 Int_t leng = strlen(text) ;
1864 quote1 = quote2 =
kFALSE ;
1866 for (i=0 ; i<leng ; i++) {
1868 case '\'' : quote1 = !quote1 ; break ;
1869 case '"' : quote2 = !quote2 ; break ;
1872 if (text[i] ==
'@') {
1874 if ( *(p+1) ==
'{' || *(p+1) ==
'}' || *(p+1) ==
'[' || *(p+1) ==
']') {
1891 gPad->PaintText(xx,yy,text);
1941 Double_t xx =
gPad->AbsPixeltoX(
Int_t((x1-xOrigin)*cosang+(y1-yOrigin)*sinang+xOrigin));
1942 Double_t yy =
gPad->AbsPixeltoY(
Int_t((x1-xOrigin)*-sinang+(y1-yOrigin)*cosang+yOrigin));
1944 Double_t xx2 =
gPad->AbsPixeltoX(
Int_t((x2-xOrigin)*cosang+(y2-yOrigin)*sinang+xOrigin));
1945 Double_t yy2 =
gPad->AbsPixeltoY(
Int_t((x2-xOrigin)*-sinang+(y2-yOrigin)*cosang+yOrigin));
1949 gPad->PaintLine(xx,yy,xx2,yy2);
1963 const Int_t np = 40;
1971 for (
Int_t i=0;i<=np;i++) {
1975 x[i] =
gPad->AbsPixeltoX(
Int_t( dx*cosang+ dy*sinang +xOrigin));
1976 y[i] =
gPad->AbsPixeltoY(
Int_t(-dx*sinang+ dy*cosang +yOrigin));
1978 gPad->PaintPolyLine(np+1,x,y);
1994 const Int_t np = 40;
2002 for (
Int_t i=0;i<=np;i++) {
2006 x[i] =
gPad->AbsPixeltoX(
Int_t( dx*cosang+dy*sinang +xOrigin));
2007 y[i] =
gPad->AbsPixeltoY(
Int_t(-dx*sinang+dy*cosang +yOrigin));
2009 gPad->PaintPolyLine(np+1,x,y);
2046 if (t.Index(
"#")>=0 || t.Index(
"^")>=0 || t.Index(
"\\")>=0) {
2047 t.ReplaceAll(
"#LT",
"\\langle");
2048 t.ReplaceAll(
"#GT",
"\\rangle");
2049 t.ReplaceAll(
"#club",
"\\clubsuit");
2050 t.ReplaceAll(
"#spade",
"\\spadesuit");
2051 t.ReplaceAll(
"#heart",
"\\heartsuit");
2052 t.ReplaceAll(
"#diamond",
"\\diamondsuit");
2053 t.ReplaceAll(
"#voidn",
"\\wp");
2054 t.ReplaceAll(
"#voidb",
"f");
2055 t.ReplaceAll(
"#ocopyright",
"\\copyright");
2056 t.ReplaceAll(
"#trademark",
"TM");
2057 t.ReplaceAll(
"#void3",
"TM");
2058 t.ReplaceAll(
"#oright",
"R");
2059 t.ReplaceAll(
"#void1",
"R");
2060 t.ReplaceAll(
"#3dots",
"\\ldots");
2061 t.ReplaceAll(
"#lbar",
"\\mid");
2062 t.ReplaceAll(
"#void8",
"\\mid");
2063 t.ReplaceAll(
"#divide",
"\\div");
2064 t.ReplaceAll(
"#Jgothic",
"\\Im");
2065 t.ReplaceAll(
"#Rgothic",
"\\Re");
2066 t.ReplaceAll(
"#doublequote",
"\"");
2067 t.ReplaceAll(
"#plus",
"+");
2068 t.ReplaceAll(
"#minus",
"-");
2069 t.ReplaceAll(
"#/",
"/");
2070 t.ReplaceAll(
"#upoint",
".");
2071 t.ReplaceAll(
"#aa",
"\\mbox{\\aa}");
2072 t.ReplaceAll(
"#AA",
"\\mbox{\\AA}");
2074 t.ReplaceAll(
"#omicron",
"o");
2075 t.ReplaceAll(
"#Alpha",
"A");
2076 t.ReplaceAll(
"#Beta",
"B");
2077 t.ReplaceAll(
"#Epsilon",
"E");
2078 t.ReplaceAll(
"#Zeta",
"Z");
2079 t.ReplaceAll(
"#Eta",
"H");
2080 t.ReplaceAll(
"#Iota",
"I");
2081 t.ReplaceAll(
"#Kappa",
"K");
2082 t.ReplaceAll(
"#Mu",
"M");
2083 t.ReplaceAll(
"#Nu",
"N");
2084 t.ReplaceAll(
"#Omicron",
"O");
2085 t.ReplaceAll(
"#Rho",
"P");
2086 t.ReplaceAll(
"#Tau",
"T");
2087 t.ReplaceAll(
"#Chi",
"X");
2088 t.ReplaceAll(
"#varomega",
"\\varpi");
2090 t.ReplaceAll(
"#varUpsilon",
"?");
2091 t.ReplaceAll(
"#corner",
"?");
2092 t.ReplaceAll(
"#ltbar",
"?");
2093 t.ReplaceAll(
"#bottombar",
"?");
2094 t.ReplaceAll(
"#notsubset",
"?");
2095 t.ReplaceAll(
"#arcbottom",
"?");
2096 t.ReplaceAll(
"#cbar",
"?");
2097 t.ReplaceAll(
"#arctop",
"?");
2098 t.ReplaceAll(
"#topbar",
"?");
2099 t.ReplaceAll(
"#arcbar",
"?");
2100 t.ReplaceAll(
"#downleftarrow",
"?");
2101 t.ReplaceAll(
"#splitline",
"\\genfrac{}{}{0pt}{}");
2103 t.ReplaceAll(
"#",
"\\");
2104 t.ReplaceAll(
"%",
"\\%");
2114 gPad->SetBatch(saveb);
2129 if( newText.
Length() == 0)
return 0;
2134 std::cout<<
"\n*ERROR<TLatex>: "<<
fError<<std::endl;
2135 std::cout<<
"==> "<<text1<<std::endl;
2144 gPad->PaintText(x,y,text1);
2150 if (strstr(text1,
"\\")) {
2188 x =
gPad->XtoAbsPixel(x);
2189 y =
gPad->YtoAbsPixel(y);
2209 std::cout<<
"*ERROR<TLatex>: "<<
fError<<std::endl;
2210 std::cout<<
"==> "<<text<<std::endl;
2213 newSpec.
fSize = size;
2216 case 0: y -= fs.
Under() ;
break;
2218 case 2: y += fs.
Height()*0.5-fs.
Under(); y++;
break;
2219 case 3: y += fs.
Over() ;
break;
2222 case 2: x -= fs.
Width()/2 ;
break;
2223 case 3: x -= fs.
Width() ;
break;
2225 Analyse(x,y,newSpec,text,length);
2228 gPad->SetBatch(saveb);
2237 if (
fError != 0)
return 0;
2246 const Char_t *kWord1[] = {
"{}^{",
"{}_{",
"^{",
"_{",
"#scale{",
"#color{",
"#font{",
"#sqrt{",
"#[]{",
"#{}{",
"#||{",
2247 "#bar{",
"#vec{",
"#dot{",
"#hat{",
"#ddot{",
"#acute{",
"#grave{",
"#check{",
"#tilde{",
"#slash{",
"#bf{",
"#it{",
"#mbox{",
2248 "\\scale{",
"\\color{",
"\\font{",
"\\sqrt{",
"\\[]{",
"\\{}{",
"\\||{",
"#(){",
"\\(){",
2249 "\\bar{",
"\\vec{",
"\\dot{",
"\\hat{",
"\\ddot{",
"\\acute{",
"\\grave{",
"\\check{",
"\\bf{",
"\\it{",
"\\mbox{"};
2250 const Char_t *kWord2[] = {
"#scale[",
"#color[",
"#font[",
"#sqrt[",
"#kern[",
"#lower[",
"\\scale[",
"\\color[",
"\\font[",
"\\sqrt[",
"\\kern[",
"\\lower["};
2251 const Char_t *kWord3[] = {
"#frac{",
"\\frac{",
"#splitline{",
"\\splitline{"};
2252 const Char_t *kLeft1[] = {
"#left[",
"\\left[",
"#left{",
"\\left{",
"#left|",
"\\left|",
"#left(",
"\\left("};
2253 const Char_t *kLeft2[] = {
"#[]{",
"#[]{",
"#{}{",
"#{}{",
"#||{",
"#||{",
"#(){",
"#(){"};
2254 const Char_t *kRight[] = {
"#right]",
"\\right]",
"#right}",
"\\right}",
"#right|",
"\\right|",
"#right)",
"\\right)"};
2255 const Int_t lkWord1[] = {4,4,2,2,7,7,6,6,4,4,4,5,5,5,5,6,7,7,7,7,7,4,4,6,7,7,6,6,4,4,4,4,4,5,5,5,5,6,7,7,7,4,4,6};
2256 const Int_t lkWord2[] = {7,7,6,6,6,7,7,7,6,6,6,7} ;
2257 const Int_t lkWord3[] = {6,6,11,11} ;
2258 Int_t nkWord1 = 44, nkWord2 = 12, nkWord3 = 4;
2260 Int_t nLeft1 , nRight , nOfLeft, nOfRight;
2264 nLeft1 = nRight = 8 ;
2265 nOfLeft = nOfRight = 0 ;
2267 Char_t buf[11] ;
for (i=0;i<11;i++) buf[i]=0;
2272 Int_t nOfCurlyBracket, nOfKW1, nOfKW2, nOfKW3, nOfSquareCurly, nOfCurlyCurly ;
2273 Int_t nOfExtraCurly = 0 , nOfExtraSquare = 0;
2274 Int_t nOfSquareBracket = 0 ;
2281 while (i < length) {
2284 strncpy(buf,&text[i],
TMath::Min(7,length-i));
2286 for (k = 0 ; k < nLeft1 ; k++) {
2287 if (strncmp(buf,kLeft1[k],lLeft1)==0) {
2296 for(k=0;k<nRight;k++) {
2297 if (strncmp(buf,kRight[k],lRight)==0) {
2306 if (nOfLeft != nOfRight) {
2307 printf(
" nOfLeft = %d, nOfRight = %d\n",nOfLeft,nOfRight) ;
2309 fError =
"Operators \"#left\" and \"#right\" don't match !" ;
2313 for (k = 0 ; k < nLeft1 ; k++) {
2314 text.
ReplaceAll(kLeft1[k],lLeft1,kLeft2[k],lLeft2) ;
2316 for (k = 0 ; k < nRight ; k++) {
2321 i = nOfCurlyBracket = nOfKW1 = nOfKW2 = nOfKW3 = nOfSquareCurly = nOfCurlyCurly =0 ;
2324 case '"' : quote1 = !quote1 ; break ;
2325 case '\'': quote2 = !quote2 ; break ;
2329 strncpy(buf,&text[i],
TMath::Min(11,length-i));
2332 for(k=0;k<nkWord1;k++) {
2333 if (strncmp(buf,kWord1[k],lkWord1[k])==0) {
2343 for(k=0;k<nkWord2;k++) {
2344 if (strncmp(buf,kWord2[k],lkWord2[k])==0) {
2354 for(k=0;k<nkWord3;k++) {
2355 if (strncmp(buf,kWord3[k],lkWord3[k])==0) {
2365 if (strncmp(buf,
"}{",2) == 0 && opFrac) {
2370 else if (strncmp(buf,
"]{",2) == 0 && nOfSquareBracket) {
2374 nOfSquareBracket-- ;
2376 else if (strncmp(buf,
"@{",2) == 0 || strncmp(buf,
"@}",2) == 0) {
2379 else if (strncmp(buf,
"@[",2) == 0 || strncmp(buf,
"@]",2) == 0) {
2382 else if (text[i] ==
']' ) {
2388 else if (text[i] ==
'[' ) {
2394 else if (text[i] ==
'{' ) {
2400 else if (text[i] ==
'}' ) {
2401 if ( nOfCurlyBracket) {
2416 if (nOfKW2 != nOfSquareCurly) {
2418 fError =
"Invalid number of \"]{\"" ;
2420 else if (nOfKW3 != nOfCurlyCurly) {
2422 fError =
"Error in syntax of \"#frac\"" ;
2424 else if (nOfCurlyBracket < 0) {
2426 fError =
"Missing \"{\"" ;
2428 else if (nOfCurlyBracket > 0) {
2430 fError =
"Missing \"}\"" ;
2432 else if (nOfSquareBracket < 0) {
2434 fError =
"Missing \"[\"" ;
2436 else if (nOfSquareBracket > 0) {
2438 fError =
"Missing \"]\"" ;
2468 spec.
fSize = size/hw;
2509 if( newText.
Length() == 0)
return 0;
2519 std::cout<<
"\n*ERROR<TLatex>: "<<
fError<<std::endl;
2520 std::cout<<
"==> "<<
GetTitle()<<std::endl;
2540 if( newText.
Length() == 0)
return;
2551 std::cout<<
"\n*ERROR<TLatex>: "<<
fError<<std::endl;
2552 std::cout<<
"==> "<<
GetTitle()<<std::endl;
2558 Int_t cBoxX[4], cBoxY[4];
2561 ptx =
gPad->UtoPixel(
fX);
2562 pty =
gPad->VtoPixel(
fY);
2568 Int_t x1 = cBoxX[0];
2569 Int_t x2 = cBoxX[0];
2570 Int_t y1 = cBoxY[0];
2571 Int_t y2 = cBoxY[0];
2572 for (
Int_t i=1; i<4; i++) {
2573 if (cBoxX[i] < x1) x1 = cBoxX[i];
2574 if (cBoxX[i] > x2) x2 = cBoxX[i];
2575 if (cBoxY[i] < y1) y1 = cBoxY[i];
2576 if (cBoxY[i] > y2) y2 = cBoxY[i];
2596 if( newText.
Length() == 0)
return 0;
2606 std::cout<<
"\n*ERROR<TLatex>: "<<
fError<<std::endl;
2607 std::cout<<
"==> "<<
GetTitle()<<std::endl;
2669 out<<
" tex = new TLatex("<<
fX<<
","<<
fY<<
","<<quote<<s.
Data()<<quote<<
");"<<std::endl;
2675 out<<
" tex->Draw();"<<std::endl;
virtual void SetLineWidth(Width_t lwidth)
Set the line width.
Int_t fLimitFactorSize
lower bound for subscripts/superscripts size
Bool_t fShow
! is true during the second pass (Painting)
virtual void PaintMathText(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
Paint text (used by Paint()).
virtual void GetTextAscentDescent(UInt_t &a, UInt_t &d, const char *text) const
Return text ascent and descent for string text.
Double_t fOriginSize
Font size of the starting font.
virtual Color_t GetTextColor() const
Return the text color.
virtual Short_t GetTextAlign() const
Return the text alignment.
TString & ReplaceAll(const TString &s1, const TString &s2)
The text postion is in NDC coordinates.
Bool_t TestBit(UInt_t f) const
void Copy(TObject &text) const
Copy this text to text.
virtual Float_t GetTextAngle() const
Return the text angle.
virtual void GetControlBox(Int_t x, Int_t y, Double_t theta, Int_t cBoxX[4], Int_t cBoxY[4])
Return the text control box.
Int_t fTabMax
! Maximum allocation for array fTabSize;
Short_t Min(Short_t a, Short_t b)
void GetBoundingBox(UInt_t &w, UInt_t &h, Bool_t angle=kFALSE)
Get the text width and height.
virtual void Modify()
Change current line attributes if necessary.
TLatex & operator=(const TLatex &)
assignment operator
TString & Insert(Ssiz_t pos, const char *s)
virtual Width_t GetLineWidth() const
Return the line width.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
if object in a list can be deleted
Int_t PaintLatex1(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
Drawing function.
virtual void AppendPad(Option_t *option="")
Append graphics object to current pad.
virtual void Modify()
Change current text attributes if necessary.
TLatex * DrawLatexNDC(Double_t x, Double_t y, const char *text)
Draw this TLatex with new coordinates in NDC.
virtual void SetTextFont(Font_t tfont=62)
Set the text font.
static const double x2[5]
void DrawLine(Double_t x1, Double_t y1, Double_t x2, Double_t y2, TextSpec_t spec)
Draw a line in a Latex formula.
Double_t GetYsize()
Return size of the formula along Y in pad coordinates.
void DrawCircle(Double_t x1, Double_t y1, Double_t r, TextSpec_t spec)
Draw an arc of ellipse in a Latex formula (right or left parenthesis)
void Copy(TAttLine &attline) const
Copy this line attributes to a new TAttLine.
virtual void SaveLineAttributes(std::ostream &out, const char *name, Int_t coldef=1, Int_t stydef=1, Int_t widdef=1)
Save line attributes as C++ statement(s) on output stream out.
virtual Float_t GetTextSize() const
Return the text size.
TLatexFormSize Anal1(TextSpec_t spec, const Char_t *t, Int_t length)
Analyse function.
To draw Mathematical Formula.
virtual void Paint(Option_t *option="")
Paint.
static const double x4[22]
TLatex * DrawLatex(Double_t x, Double_t y, const char *text)
Make a copy of this object with the new parameters And copy object attributes.
if on multiple lines(like in C++). **The " * configuration fragment. * * The "import myobject continue
Parses the configuration file.
Base class for several text objects.
TLatex()
Default constructor.
virtual void SetNDC(Bool_t isNDC=kTRUE)
Set NDC mode on if isNDC = kTRUE, off otherwise.
Int_t CheckLatexSyntax(TString &text)
Check if the Latex syntax is correct.
virtual void PaintLatex(Double_t x, Double_t y, Double_t angle, Double_t size, const char *text)
Main drawing function.
virtual void Text(Double_t x, Double_t y, const char *string)=0
void DrawParenthesis(Double_t x1, Double_t y1, Double_t r1, Double_t r2, Double_t phimin, Double_t phimax, TextSpec_t spec)
Draw an arc of ellipse in a Latex formula (right or left parenthesis)
virtual void SetTextAlign(Short_t align=11)
Set the text alignment.
const Char_t * fError
! error code
void Copy(TAttText &atttext) const
Copy this text attributes to a new TAttText.
virtual void SetLineColor(Color_t lcolor)
Set the line color.
Float_t fTextAngle
Text angle.
Double_t GetHeight() const
Return height of current pad in pixels.
virtual void SavePrimitive(std::ostream &out, Option_t *option="")
Save primitive as a C++ statement(s) on output stream out.
TNamed & operator=(const TNamed &rhs)
TNamed assignment operator.
Double_t GetXsize()
Return size of the formula along X in pad coordinates.
TLatexFormSize Readfs()
Read fs in fTabSize.
virtual void SaveTextAttributes(std::ostream &out, const char *name, Int_t alidef=12, Float_t angdef=0, Int_t coldef=1, Int_t fondef=61, Float_t sizdef=1)
Save text attributes as C++ statement(s) on output stream out.
virtual Font_t GetTextFont() const
Return the text font.
unsigned int r1[N_CITIES]
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void SetTextAngle(Float_t tangle=0)
Set the text angle.
Double_t fY
Y position of text (left,center,etc..)
TLatexFormSize Analyse(Double_t x, Double_t y, TextSpec_t spec, const Char_t *t, Int_t length)
Analyse and paint the TLatex formula.
void GetBoundingBox(UInt_t &w, UInt_t &h, Bool_t angle=kFALSE)
Return text size in pixels.
Font_t fTextFont
Text font.
TLatexFormSize FirstParse(Double_t angle, Double_t size, const Char_t *text)
First parsing of the analyse sequence.
void Savefs(TLatexFormSize *fs)
Save fs values in array fTabSize.
FormSize_t * fTabSize
! array of values for the different zones
virtual Color_t GetLineColor() const
Return the line color.
virtual ~TLatex()
Destructor.
static const double x1[5]
Int_t fPos
! Current position in array fTabSize;
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
To draw TeX Mathematical Formula.
void Copy(TObject &text) const
Copy this TLatex object to another TLatex.
Double_t fFactorPos
! Relative position of subscripts and superscripts
virtual void GetTextExtent(UInt_t &w, UInt_t &h, const char *text) const
Return text extent for string text.
Mother of all ROOT objects.
TLatex helper struct holding the attributes of a piece of text.
Short_t Max(Short_t a, Short_t b)
Bool_t fItalic
! Currently inside italic operator
R__EXTERN TVirtualPS * gVirtualPS
virtual void SetLimitIndiceSize(Int_t limitFactorSize)
Set limit for text resizing of subscripts and superscripts.
virtual void SetTextColor(Color_t tcolor=1)
Set the text color.
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
virtual void SetTextSize(Float_t tsize=1)
Set the text size.
virtual void PaintText(Double_t x, Double_t y, const char *text)
Draw this text with new coordinates.
Double_t GetYsize(void)
Get Y size.
Double_t GetXsize(void)
Get X size.
unsigned int r2[N_CITIES]
Double_t fFactorSize
! Relative size of subscripts and superscripts
virtual const char * GetTitle() const
Returns title of object.
Double_t fX
X position of text (left,center,etc..)
virtual void SetIndiceSize(Double_t factorSize)
Set relative size of subscripts and superscripts.
Short_t fTextAlign
Text alignment.
static const double x3[11]
const char * Data() const