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;}
161 fStream =
new std::ofstream(fname,std::ios::out);
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) {
291 PrintStr(
", draw opacity=0, pattern color=c");
353 Warning(
"DrawFrame",
"not yet implemented");
368 Warning(
"DrawPolyLine",
"not yet implemented");
383 Warning(
"DrawPolyLineNDC",
"not yet implemented");
391 Warning(
"DrawPolyMarker",
"not yet implemented");
426 PrintStr(
"}{\\draw[mark options={color=c,fill=c,rotate=180},mark size=");
428 PrintStr(
"}{\\draw[mark options={color=c,fill=c},mark size=");
494 PrintStr(
"] plot coordinates {\\P};}");
510 Error(
"DrawPS",
"Two points are needed");
529 tikzSpec.
Append(
",dash pattern=");
561 }
else if (fillis==0) {
593 PrintStr(
", draw opacity=0, pattern color=c");
710 if (color < 0) color = 0;
765 ftsize = (sizeTTF*
fXsize*
gPad->GetAbsWNDC())/wh;
769 ftsize = (sizeTTF*
fYsize*
gPad->GetAbsHNDC())/hh;
772 if (ftsize <= 0)
return;
788 if (txalh <1) txalh = 1;
else if (txalh > 3) txalh = 3;
790 if (txalv <1) txalv = 1;
else if (txalv > 3) txalv = 3;
794 if (txalh!=2 || txalv!=2) {
867 Warning(
"CellArrayBegin",
"not yet implemented");
875 Warning(
"CellArrayFill",
"not yet implemented");
883 Warning(
"CellArrayEnd",
"not yet implemented");
891 Warning(
"DrawPS",
"not yet implemented");
900 PrintStr(
"\\pgfdeclareplotmark{cross} {@");
901 PrintStr(
"\\pgfpathmoveto{\\pgfpoint{-0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
902 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
903 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
904 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
905 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
906 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
907 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
908 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
909 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
910 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
911 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
912 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
918 PrintStr(
"\\pgfdeclareplotmark{cross*} {@");
919 PrintStr(
"\\pgfpathmoveto{\\pgfpoint{-0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
920 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
921 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
922 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
923 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
924 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
925 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
926 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
927 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
928 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
929 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
930 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
932 PrintStr(
"\\pgfusepathqfillstroke@");
936 PrintStr(
"\\pgfdeclareplotmark{newstar} {@");
937 PrintStr(
"\\pgfpathmoveto{\\pgfqpoint{0pt}{\\pgfplotmarksize}}@");
938 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{44}{0.5\\pgfplotmarksize}}@");
939 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{18}{\\pgfplotmarksize}}@");
940 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-20}{0.5\\pgfplotmarksize}}@");
941 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-54}{\\pgfplotmarksize}}@");
942 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-90}{0.5\\pgfplotmarksize}}@");
943 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{234}{\\pgfplotmarksize}}@");
944 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{198}{0.5\\pgfplotmarksize}}@");
945 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{162}{\\pgfplotmarksize}}@");
946 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{134}{0.5\\pgfplotmarksize}}@");
952 PrintStr(
"\\pgfdeclareplotmark{newstar*} {@");
953 PrintStr(
"\\pgfpathmoveto{\\pgfqpoint{0pt}{\\pgfplotmarksize}}@");
954 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{44}{0.5\\pgfplotmarksize}}@");
955 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{18}{\\pgfplotmarksize}}@");
956 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-20}{0.5\\pgfplotmarksize}}@");
957 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-54}{\\pgfplotmarksize}}@");
958 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-90}{0.5\\pgfplotmarksize}}@");
959 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{234}{\\pgfplotmarksize}}@");
960 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{198}{0.5\\pgfplotmarksize}}@");
961 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{162}{\\pgfplotmarksize}}@");
962 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{134}{0.5\\pgfplotmarksize}}@");
964 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.
Float_t GetLineScalePS() const
int iterate(rng_state_t *X)
void DrawPolyLine(Int_t n, TPoints *xy)
Draw a PolyLine.
void SetMarkerSize(Size_t msize=1)
Set size for markers.
Float_t fCurrentRed
Current Red component.
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.
void GetPaperSize(Float_t &xsize, Float_t &ysize) const
Set paper size for PostScript output.
Float_t UtoTeX(Double_t u)
Convert U from NDC coordinate to TeX.
Size_t fMarkerSize
Marker size.
Float_t fLineScale
Line width scale factor.
void DrawPS(Int_t n, Float_t *xw, Float_t *yw)
Not needed in TeX case.
void DefineMarkers()
add additional pgfplotmarks
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
void Text(Double_t x, Double_t y, const char *string)
Draw text.
virtual ~TTeXDump()
Default TeX destructor.
Float_t fCurrentAlpha
Current Alpha value.
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.
Float_t fCurrentBlue
Current Blue component.
static const double x2[5]
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
virtual void PrintStr(const char *string="")
Output the string str in the output buffer.
TString & Append(const char *cs)
Float_t fYsize
Page size along Y.
Float_t XtoTeX(Double_t x)
Convert X from world coordinate to TeX.
Style_t fMarkerStyle
Marker style.
void Off()
Deactivate an already open TeX file.
Float_t fTextAngle
Text angle.
TTeXDump()
Default TeX constructor.
Style_t fLineStyle
Line style.
Float_t fXsize
Page size along X.
void Open(const char *filename, Int_t type=-111)
Open a TeX file.
Float_t fCurrentGreen
Current Green component.
Bool_t fBoundingBox
True when the Tex header is printed.
void SetFillColor(Color_t cindex=1)
Set color index for fill areas.
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
Color_t fLineColor
Line color.
Bool_t fRange
True when a range has been defined.
void NewPage()
Start the TeX page. This function starts the tikzpicture environment.
void On()
Activate an already open TeX file.
Width_t fLineWidth
Line width.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
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.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
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.
virtual Color_t GetFillColor() const
Return the fill area color.
void TextNDC(Double_t u, Double_t v, const char *string)
Write a string of characters in NDC.
The color creation and management class.
Float_t fTextSize
Text size.
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.
Color_t fFillColor
Fill area color.
void SetMarkerColor(Color_t cindex=1)
Set color index for markers.
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
R__EXTERN TVirtualPS * gVirtualPS
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)
Paint PolyMarker.
Int_t Atoi() const
Return integer value of string.
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.
Color_t fMarkerColor
Marker color.
Color_t fTextColor
Text color.
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.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Style_t fFillStyle
Fill area style.
Short_t fTextAlign
Text alignment.
const char * Data() const
void DrawPolyLineNDC(Int_t n, TPoints *uv)
Draw a PolyLine in NDC space.
Int_t fType
Workstation type used to know if the Tex is open.