Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TImageDump.h
Go to the documentation of this file.
1 // @(#)root/postscript:$Id$
2 // Author: Valeriy Onuchin 29/04/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TImageDump
13 #define ROOT_TImageDump
14 
15 
16 #include "TVirtualPS.h"
17 
18 class TImage;
19 class TColor;
20 class TPoint;
21 
22 class TImageDump : public TVirtualPS {
23 protected:
24  TImage *fImage; ///< Image
25  Int_t fType; ///< PostScript workstation type
26 
27  Int_t XtoPixel(Double_t x);
28  Int_t YtoPixel(Double_t y);
29  void DrawDashPolyLine(Int_t npoints, TPoint *pt, UInt_t nDash,
30  const char* pDash, const char* col, UInt_t thick);
31 
32 public:
33  TImageDump();
34  TImageDump(const char *filename, Int_t type = -111);
35  virtual ~TImageDump();
36 
37  void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2);
38  void CellArrayFill(Int_t r, Int_t g, Int_t b);
39  void CellArrayEnd();
40  void Close(Option_t *opt = "");
41  void DrawBox(Double_t x1, Double_t y1,Double_t x2, Double_t y2);
42  void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt,
43  Int_t mode, Int_t border, Int_t dark, Int_t light);
44  void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y);
45  void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y);
46  void DrawPS(Int_t n, Float_t *xw, Float_t *yw);
47  void DrawPS(Int_t n, Double_t *xw, Double_t *yw);
48  void NewPage();
49  void Open(const char *filename, Int_t type = -111);
50  void Text(Double_t x, Double_t y, const char *string);
51  void Text(Double_t x, Double_t y, const wchar_t *string);
52  void SetColor(Float_t r, Float_t g, Float_t b);
53  void *GetStream() const { return (void*)fImage; }
54  void SetType(Int_t type = -111) { fType = type; }
55  Int_t GetType() const { return fType; }
56  TImage *GetImage() const { return fImage; }
57 
58  ClassDef(TImageDump,0) // create image in batch mode
59 };
60 
61 #endif