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=none, 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=none, pattern color=c");
710 if (color < 0) color = 0;
769 ftsize = (sizeTTF*
fXsize*
gPad->GetAbsWNDC())/wh;
773 ftsize = (sizeTTF*
fYsize*
gPad->GetAbsHNDC())/hh;
776 if (ftsize <= 0)
return;
792 if (txalh <1) txalh = 1;
else if (txalh > 3) txalh = 3;
794 if (txalv <1) txalv = 1;
else if (txalv > 3) txalv = 3;
798 if (txalh!=2 || txalv!=2) {
871 Warning(
"CellArrayBegin",
"not yet implemented");
879 Warning(
"CellArrayFill",
"not yet implemented");
887 Warning(
"CellArrayEnd",
"not yet implemented");
895 Warning(
"DrawPS",
"not yet implemented");
904 PrintStr(
"\\pgfdeclareplotmark{cross} {@");
905 PrintStr(
"\\pgfpathmoveto{\\pgfpoint{-0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
906 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
907 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
908 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
909 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
910 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
911 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
912 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
913 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
914 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
915 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
916 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
922 PrintStr(
"\\pgfdeclareplotmark{cross*} {@");
923 PrintStr(
"\\pgfpathmoveto{\\pgfpoint{-0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
924 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{\\pgfplotmarksize}}@");
925 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
926 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
927 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+1\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
928 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
929 PrintStr(
"\\pgfpathlineto{\\pgfpoint{+0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
930 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-1.\\pgfplotmarksize}}@");
931 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
932 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{-0.3\\pgfplotmarksize}}@");
933 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-1.\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
934 PrintStr(
"\\pgfpathlineto{\\pgfpoint{-0.3\\pgfplotmarksize}{0.3\\pgfplotmarksize}}@");
936 PrintStr(
"\\pgfusepathqfillstroke@");
940 PrintStr(
"\\pgfdeclareplotmark{newstar} {@");
941 PrintStr(
"\\pgfpathmoveto{\\pgfqpoint{0pt}{\\pgfplotmarksize}}@");
942 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{44}{0.5\\pgfplotmarksize}}@");
943 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{18}{\\pgfplotmarksize}}@");
944 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-20}{0.5\\pgfplotmarksize}}@");
945 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-54}{\\pgfplotmarksize}}@");
946 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-90}{0.5\\pgfplotmarksize}}@");
947 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{234}{\\pgfplotmarksize}}@");
948 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{198}{0.5\\pgfplotmarksize}}@");
949 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{162}{\\pgfplotmarksize}}@");
950 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{134}{0.5\\pgfplotmarksize}}@");
956 PrintStr(
"\\pgfdeclareplotmark{newstar*} {@");
957 PrintStr(
"\\pgfpathmoveto{\\pgfqpoint{0pt}{\\pgfplotmarksize}}@");
958 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{44}{0.5\\pgfplotmarksize}}@");
959 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{18}{\\pgfplotmarksize}}@");
960 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-20}{0.5\\pgfplotmarksize}}@");
961 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-54}{\\pgfplotmarksize}}@");
962 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{-90}{0.5\\pgfplotmarksize}}@");
963 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{234}{\\pgfplotmarksize}}@");
964 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{198}{0.5\\pgfplotmarksize}}@");
965 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{162}{\\pgfplotmarksize}}@");
966 PrintStr(
"\\pgfpathlineto{\\pgfqpointpolar{134}{0.5\\pgfplotmarksize}}@");
968 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.