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@");
static const double x2[5]
static const double x1[5]
char * Form(const char *fmt,...)
R__EXTERN TStyle * gStyle
R__EXTERN TVirtualPS * gVirtualPS
virtual Color_t GetFillColor() const
Return the fill area color.
Style_t fFillStyle
Fill area style.
Color_t fFillColor
Fill area color.
Width_t fLineWidth
Line width.
Style_t fLineStyle
Line style.
Color_t fLineColor
Line color.
Color_t fMarkerColor
Marker color.
Size_t fMarkerSize
Marker size.
Style_t fMarkerStyle
Marker style.
Color_t fTextColor
Text color.
Float_t fTextAngle
Text angle.
Short_t fTextAlign
Text alignment.
Float_t fTextSize
Text size.
The color creation and management class.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
2-D graphics point (world coordinates).
Int_t Atoi() const
Return integer value of string.
TSubString Strip(EStripType s=kTrailing, char c=' ') const
Return a substring of self stripped at beginning and/or end.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
TString & Prepend(const char *cs)
TString & Append(const char *cs)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
const char * GetLineStyleString(Int_t i=1) const
Return line style string (used by PostScript).
void GetPaperSize(Float_t &xsize, Float_t &ysize) const
Set paper size for PostScript output.
Float_t GetLineScalePS() const
void SetLineColor(Color_t cindex=1)
Set color index for lines.
void Open(const char *filename, Int_t type=-111)
Open a TeX file.
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 Close(Option_t *opt="")
Close a TeX file.
void SetLineScale(Float_t scale=1)
void SetMarkerColor(Color_t cindex=1)
Set color index for markers.
void DrawPolyLineNDC(Int_t n, TPoints *uv)
Draw a PolyLine in NDC space.
void On()
Activate an already open TeX file.
void DefineMarkers()
add additional pgfplotmarks
Bool_t fBoundingBox
True when the Tex header is printed.
Float_t fCurrentRed
Current Red component.
Float_t fXsize
Page size along X.
void SetLineWidth(Width_t linewidth=1)
Set the lines width.
void CellArrayFill(Int_t r, Int_t g, Int_t b)
Paint the Cell Array.
Float_t VtoTeX(Double_t v)
Convert V from NDC coordinate to TeX.
void SetMarkerSize(Size_t msize=1)
Set size for markers.
Bool_t fRange
True when a range has been defined.
void Range(Float_t xrange, Float_t yrange)
Set the range for the paper in centimetres.
void CellArrayEnd()
End the Cell Array painting.
void DrawPS(Int_t n, Float_t *xw, Float_t *yw)
Not needed in TeX case.
Float_t fCurrentAlpha
Current Alpha value.
virtual ~TTeXDump()
Default TeX destructor.
void SetTextColor(Color_t cindex=1)
Set color index for text.
Float_t fLineScale
Line width scale factor.
void TextNDC(Double_t u, Double_t v, const char *string)
Write a string of characters in NDC.
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.
Int_t fType
Workstation type used to know if the Tex is open.
Float_t UtoTeX(Double_t u)
Convert U from NDC coordinate to TeX.
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw a Box.
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)
Paint PolyMarker.
Float_t YtoTeX(Double_t y)
Convert Y from world coordinate to TeX.
void DrawPolyLine(Int_t n, TPoints *xy)
Draw a PolyLine.
void Text(Double_t x, Double_t y, const char *string)
Draw text.
void SetFillColor(Color_t cindex=1)
Set color index for fill areas.
void Off()
Deactivate an already open TeX file.
TTeXDump()
Default TeX constructor.
Float_t fCurrentGreen
Current Green component.
Float_t fYsize
Page size along Y.
void SetColor(Int_t color=1)
Set color with its color index.
Float_t fCurrentBlue
Current Blue component.
Float_t XtoTeX(Double_t x)
Convert X from world coordinate to TeX.
void SetLineStyle(Style_t linestyle=1)
Change the line style.
void NewPage()
Start the TeX page. This function starts the tikzpicture environment.
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
virtual void PrintStr(const char *string="")
Output the string str in the output buffer.
virtual void PrintFast(Int_t nch, const char *string="")
Fast version of Print.
virtual void WriteReal(Float_t r, Bool_t space=kTRUE)
Write a Real number to the file.
int iterate(rng_state_t *X)
static constexpr double cm