File indexing completed on 2025-01-18 10:12:20
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef ROOT_TPostScript
0013 #define ROOT_TPostScript
0014
0015
0016 #include "TVirtualPS.h"
0017
0018 class TPoints;
0019
0020 class TPostScript : public TVirtualPS {
0021
0022 protected:
0023 Float_t fX1v;
0024 Float_t fY1v;
0025 Float_t fX2v;
0026 Float_t fY2v;
0027 Float_t fX1w;
0028 Float_t fY1w;
0029 Float_t fX2w;
0030 Float_t fY2w;
0031 Float_t fDXC;
0032 Float_t fDYC;
0033 Float_t fXC;
0034 Float_t fYC;
0035 Float_t fFX;
0036 Float_t fFY;
0037 Float_t fXVP1;
0038 Float_t fXVP2;
0039 Float_t fYVP1;
0040 Float_t fYVP2;
0041 Float_t fXVS1;
0042 Float_t fXVS2;
0043 Float_t fYVS1;
0044 Float_t fYVS2;
0045 Float_t fXsize;
0046 Float_t fYsize;
0047 Float_t fMaxsize;
0048 Float_t fRed;
0049 Float_t fGreen;
0050 Float_t fBlue;
0051 Float_t fLineScale;
0052 Int_t fSave;
0053 Int_t fNXzone;
0054 Int_t fNYzone;
0055 Int_t fIXzone;
0056 Int_t fIYzone;
0057 Float_t fMarkerSizeCur;
0058 Int_t fCurrentColor;
0059 Int_t fNpages;
0060 Int_t fType;
0061 Int_t fMode;
0062 Int_t fClip;
0063 Bool_t fBoundingBox;
0064 Bool_t fClear;
0065 Bool_t fClipStatus;
0066 Bool_t fRange;
0067 Bool_t fZone;
0068 char fPatterns[32];
0069 Int_t fNbinCT;
0070 Int_t fNbCellW;
0071 Int_t fNbCellLine;
0072 Int_t fMaxLines;
0073 Int_t fLastCellRed;
0074 Int_t fLastCellGreen;
0075 Int_t fLastCellBlue;
0076 Int_t fNBSameColorCell;
0077 TString fFileName;
0078 Bool_t fFontEmbed;
0079
0080 static Int_t fgLineJoin;
0081 static Int_t fgLineCap;
0082
0083 public:
0084 TPostScript();
0085 TPostScript(const char *filename, Int_t type=-111);
0086 ~TPostScript() override;
0087
0088 void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2,
0089 Double_t y1, Double_t y2) override;
0090 void CellArrayFill(Int_t r, Int_t g, Int_t b) override;
0091 void CellArrayEnd() override;
0092 void Close(Option_t *opt="") override;
0093 Int_t CMtoPS(Double_t u) {return Int_t(0.5 + 72*u/2.54);}
0094 void DefineMarkers();
0095 void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2) override;
0096 void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark,
0097 Int_t light) override;
0098 void DrawHatch(Float_t dy, Float_t angle, Int_t n, Float_t *x, Float_t *y);
0099 void DrawHatch(Float_t dy, Float_t angle, Int_t n, Double_t *x, Double_t *y);
0100 void DrawPolyLine(Int_t n, TPoints *xy);
0101 void DrawPolyLineNDC(Int_t n, TPoints *uv);
0102 void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y) override;
0103 void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y) override;
0104 void DrawPS(Int_t n, Float_t *xw, Float_t *yw) override;
0105 void DrawPS(Int_t n, Double_t *xw, Double_t *yw) override;
0106 bool FontEmbedType1(const char *filename);
0107 bool FontEmbedType2(const char *filename);
0108 bool FontEmbedType42(const char *filename);
0109 void FontEmbed();
0110 void FontEncode();
0111 void Initialize();
0112 void NewPage() override;
0113 void Off();
0114 void On();
0115 void Open(const char *filename, Int_t type=-111) override;
0116 void SaveRestore(Int_t flag);
0117 void SetFillColor(Color_t cindex=1) override;
0118 void SetFillPatterns(Int_t ipat, Int_t color);
0119 void SetLineColor(Color_t cindex=1) override;
0120 void SetLineJoin(Int_t linejoin=0);
0121 void SetLineCap(Int_t linecap=0);
0122 void SetLineStyle(Style_t linestyle = 1) override;
0123 void SetLineWidth(Width_t linewidth = 1) override;
0124 void SetLineScale(Float_t scale=3) {fLineScale = scale;}
0125 void SetMarkerColor(Color_t cindex=1) override;
0126 void SetTextColor(Color_t cindex=1) override;
0127 void MovePS(Int_t x, Int_t y);
0128 void Range(Float_t xrange, Float_t yrange);
0129 void SetColor(Int_t color = 1);
0130 void SetColor(Float_t r, Float_t g, Float_t b) override;
0131 void Text(Double_t x, Double_t y, const char *string) override;
0132 void Text(Double_t x, Double_t y, const wchar_t *string) override;
0133 void TextNDC(Double_t u, Double_t v, const char *string);
0134 void TextNDC(Double_t u, Double_t v, const wchar_t *string);
0135 Int_t UtoPS(Double_t u);
0136 Int_t VtoPS(Double_t v);
0137 Int_t XtoPS(Double_t x);
0138 Int_t YtoPS(Double_t y);
0139 void Zone();
0140
0141 ClassDefOverride(TPostScript,0)
0142 };
0143
0144 #endif