00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012 #ifndef ROOT_TSVG
00013 #define ROOT_TSVG
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 #ifndef ROOT_TVirtualPS
00025 #include "TVirtualPS.h"
00026 #endif
00027
00028 class TPoints;
00029
00030 class TSVG : public TVirtualPS {
00031
00032 protected:
00033 Float_t fXsize;
00034 Float_t fYsize;
00035 Int_t fType;
00036 Bool_t fBoundingBox;
00037 Bool_t fRange;
00038 Int_t fYsizeSVG;
00039
00040 public:
00041 TSVG();
00042 TSVG(const char *filename, Int_t type=-113);
00043 virtual ~TSVG();
00044
00045 void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2);
00046 void CellArrayFill(Int_t r, Int_t g, Int_t b);
00047 void CellArrayEnd();
00048 void Close(Option_t *opt="");
00049 Int_t CMtoSVG(Double_t u) {return Int_t(0.5 + 72*u/2.54);}
00050 void DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2);
00051 void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt,
00052 Int_t mode, Int_t border, Int_t dark, Int_t light);
00053 void DrawPolyLine(Int_t n, TPoints *xy);
00054 void DrawPolyLineNDC(Int_t n, TPoints *uv);
00055 void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y);
00056 void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y);
00057 void DrawPS(Int_t n, Float_t *xw, Float_t *yw);
00058 void DrawPS(Int_t n, Double_t *xw, Double_t *yw);
00059 void Initialize();
00060 void MovePS(Int_t x, Int_t y);
00061 void NewPage();
00062 void Off();
00063 void On();
00064 void Open(const char *filename, Int_t type=-111);
00065 void Range(Float_t xrange, Float_t yrange);
00066 void SetColor(Int_t color = 1);
00067 void SetColor(Float_t r, Float_t g, Float_t b);
00068 void SetFillColor( Color_t cindex=1);
00069 void SetLineColor( Color_t cindex=1);
00070 void SetLineStyle(Style_t linestyle = 1);
00071 void SetLineWidth(Width_t linewidth = 1);
00072 void SetLineScale(Float_t =3) { }
00073 void SetMarkerColor( Color_t cindex=1);
00074 void SetTextColor( Color_t cindex=1);
00075 void Text(Double_t x, Double_t y, const char *string);
00076 void TextNDC(Double_t u, Double_t v, const char *string);
00077 Int_t UtoSVG(Double_t u);
00078 Int_t VtoSVG(Double_t v);
00079 Int_t XtoSVG(Double_t x);
00080 Int_t YtoSVG(Double_t y);
00081
00082 ClassDef(TSVG,0)
00083 };
00084
00085 #endif