13 #pragma optimize("",off)
137 Warning(
"Open",
"TeX file already open");
151 ww *=
gPad->GetWNDC();
152 wh *=
gPad->GetHNDC();
156 if (yrange >
fYsize) { yrange =
fYsize; xrange = yrange/ratio;}
163 printf(
"ERROR in TTeXDump::Open: Cannot open file:%s\n",fname);
214 Error(
"On",
"no TeX file open");
245 PrintStr(
"\\draw [color=c, fill=c");
260 if (fillis>1 && fillis<4) {
264 if (fillsi==1)
PrintStr(
"crosshatch dots");
266 if (fillsi==4)
PrintStr(
"north east lines");
267 if (fillsi==5)
PrintStr(
"north west lines");
268 if (fillsi==6)
PrintStr(
"vertical lines");
269 if (fillsi==7)
PrintStr(
"horizontal lines");
271 if (fillsi==13)
PrintStr(
"crosshatch");
334 Warning(
"DrawFrame",
"not yet implemented");
349 Warning(
"DrawPolyLine",
"not yet implemented");
364 Warning(
"DrawPolyLineNDC",
"not yet implemented");
372 Warning(
"DrawPolyMarker",
"not yet implemented");
407 PrintStr(
"}{\\draw[mark options={color=c,fill=c,rotate=180},mark size=");
409 PrintStr(
"}{\\draw[mark options={color=c,fill=c},mark size=");
475 PrintStr(
"] plot coordinates {\\P};}");
491 Error(
"DrawPS",
"Two points are needed");
516 PrintStr(
",dash pattern=on 2.4pt off 3.2pt on 0.8pt off 3.2pt");
519 PrintStr(
",dash pattern=on 4pt off 2.4pt on 0.8pt off 2.4pt");
522 PrintStr(
",dash pattern=on 4pt off 2.4pt on 0.8pt off 2.4pt on 0.8pt off 2.4pt on 0.8pt off 2.4pt");
525 PrintStr(
",dash pattern=on 4pt off 4pt");
528 PrintStr(
",dash pattern=on 4pt off 2.4pt on 0.8pt off 2.4pt on 0.8pt off 2.4pt");
531 PrintStr(
",dash pattern=on 16pt off 4pt");
534 PrintStr(
",dash pattern=on 16pt off 8pt on 0.8pt off 8pt");
544 }
else if (fillis==0) {
549 if (fillsi==1)
PrintStr(
"crosshatch dots");
551 if (fillsi==4)
PrintStr(
"north east lines");
552 if (fillsi==5)
PrintStr(
"north west lines");
553 if (fillsi==6)
PrintStr(
"vertical lines");
554 if (fillsi==7)
PrintStr(
"horizontal lines");
556 if (fillsi==13)
PrintStr(
"crosshatch");
674 if (color < 0) color = 0;
729 ftsize = (sizeTTF*
fXsize*
gPad->GetAbsWNDC())/wh;
733 ftsize = (sizeTTF*
fYsize*
gPad->GetAbsHNDC())/hh;
736 if (ftsize <= 0)
return;
752 if (txalh <1) txalh = 1;
if (txalh > 3) txalh = 3;
754 if (txalv <1) txalv = 1;
if (txalv > 3) txalv = 3;
758 if (txalh!=2 || txalv!=2) {
831 Warning(
"CellArrayBegin",
"not yet implemented");
839 Warning(
"CellArrayFill",
"not yet implemented");
847 Warning(
"CellArrayEnd",
"not yet implemented");
855 Warning(
"DrawPS",
"not yet implemented");
864 PrintStr(
"\\pgfdeclareplotmark{cross} {@");
865 PrintStr(
"\\pgfpathmoveto{\\pgfpoint{-0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
866 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
867 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
868 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
869 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
870 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
871 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
872 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
873 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
874 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
875 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
876 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
882 PrintStr(
"\\pgfdeclareplotmark{cross*} {@");
883 PrintStr(
"\\pgfpathmoveto{\\pgfpoint{-0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
884 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
885 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
886 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
887 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
888 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
889 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
890 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
891 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
892 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
893 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
894 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
896 PrintStr(
"\\pgfusepathqfillstroke@");
900 PrintStr(
"\\pgfdeclareplotmark{newstar} {@");
901 PrintStr(
"\\pgfpathmoveto{\\pgfqpoint{0pt}{\\pgfplotmarksize}}@");
902 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{44}{0.5\\pgfplotmarksize}}@");
903 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{18}{\\pgfplotmarksize}}@");
904 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-20}{0.5\\pgfplotmarksize}}@");
905 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-54}{\\pgfplotmarksize}}@");
906 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-90}{0.5\\pgfplotmarksize}}@");
907 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{234}{\\pgfplotmarksize}}@");
908 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{198}{0.5\\pgfplotmarksize}}@");
909 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{162}{\\pgfplotmarksize}}@");
910 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{134}{0.5\\pgfplotmarksize}}@");
916 PrintStr(
"\\pgfdeclareplotmark{newstar*} {@");
917 PrintStr(
"\\pgfpathmoveto{\\pgfqpoint{0pt}{\\pgfplotmarksize}}@");
918 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{44}{0.5\\pgfplotmarksize}}@");
919 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{18}{\\pgfplotmarksize}}@");
920 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-20}{0.5\\pgfplotmarksize}}@");
921 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-54}{\\pgfplotmarksize}}@");
922 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-90}{0.5\\pgfplotmarksize}}@");
923 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{234}{\\pgfplotmarksize}}@");
924 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{198}{0.5\\pgfplotmarksize}}@");
925 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{162}{\\pgfplotmarksize}}@");
926 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{134}{0.5\\pgfplotmarksize}}@");
928 PrintStr(
"\\pgfusepathqfillstroke@");
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2)
Begin the Cell Array painting.
void Close(Option_t *opt="")
Close a TeX file.
void DrawPolyLine(Int_t n, TPoints *xy)
Draw a PolyLine.
void SetMarkerSize(Size_t msize=1)
Set size for markers.
void SetLineColor(Color_t cindex=1)
Set color index for lines.
TString & ReplaceAll(const TString &s1, const TString &s2)
R__EXTERN TStyle * gStyle
void SetLineStyle(Style_t linestyle=1)
Change the line style.
Float_t UtoTeX(Double_t u)
Convert U from NDC coordinate to TeX.
void DrawPS(Int_t n, Float_t *xw, Float_t *yw)
Not needed in TeX case.
void DefineMarkers()
add additional pgfplotmarks
void Text(Double_t x, Double_t y, const char *string)
Draw text.
void GetPaperSize(Float_t &xsize, Float_t &ysize) const
Set paper size for PostScript output.
Float_t GetLineScalePS() const
virtual ~TTeXDump()
Default TeX destructor.
Float_t VtoTeX(Double_t v)
Convert V from NDC coordinate to TeX.
TString & Prepend(const char *cs)
virtual void WriteReal(Float_t r, Bool_t space=kTRUE)
Write a Real number to the file.
const char * Data() const
static const double x2[5]
virtual void PrintStr(const char *string="")
Output the string str in the output buffer.
static Vc_ALWAYS_INLINE Vector< T > abs(const Vector< T > &x)
TString & Append(const char *cs)
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Float_t XtoTeX(Double_t x)
Convert X from world coordinate to TeX.
void Off()
Deactivate an already open TeX file.
void Open(const char *filename, Int_t type=-111)
Open a TeX file.
void SetFillColor(Color_t cindex=1)
Set color index for fill areas.
virtual Color_t GetFillColor() const
void NewPage()
Start the TeX page. This function starts the tikzpicture environment.
void On()
Activate an already open TeX file.
char * Form(const char *fmt,...)
Float_t YtoTeX(Double_t y)
Convert Y from world coordinate to TeX.
void SetTextColor(Color_t cindex=1)
Set color index for text.
void SetLineScale(Float_t scale=1)
2-D graphics point (world coordinates).
void Range(Float_t xrange, Float_t yrange)
Set the range for the paper in centimetres.
static const double x1[5]
virtual void PrintFast(Int_t nch, const char *string="")
Fast version of Print.
ClassImp(TMCParticle) void TMCParticle printf(": p=(%7.3f,%7.3f,%9.3f) ;", fPx, fPy, fPz)
void TextNDC(Double_t u, Double_t v, const char *string)
Write a string of characters in NDC.
The color creation and management class.
void SetLineWidth(Width_t linewidth=1)
Set the lines width.
void SetColor(Int_t color=1)
Set color with its color index.
void CellArrayEnd()
End the Cell Array painting.
void CellArrayFill(Int_t r, Int_t g, Int_t b)
Paint the Cell Array.
void SetMarkerColor(Color_t cindex=1)
Set color index for markers.
R__EXTERN TVirtualPS * gVirtualPS
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)
Paint PolyMarker.
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw a Box.
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light)
Draw a Frame around a box.
void DrawPolyLineNDC(Int_t n, TPoints *uv)
Draw a PolyLine in NDC space.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.