Logo ROOT   6.08/07
Reference Guide
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 #ifndef ROOT_TVirtualPS
17 #include "TVirtualPS.h"
18 #endif
19 
20 class TImage;
21 class TColor;
22 class TPoint;
23 
24 class TImageDump : public TVirtualPS {
25 protected:
26  TImage *fImage; ///< Image
27  Int_t fType; ///< PostScript workstation type
28 
31  void DrawDashPolyLine(Int_t npoints, TPoint *pt, UInt_t nDash,
32  const char* pDash, const char* col, UInt_t thick);
33 
34 public:
35  TImageDump();
36  TImageDump(const char *filename, Int_t type = -111);
37  virtual ~TImageDump();
38 
40  void CellArrayFill(Int_t r, Int_t g, Int_t b);
41  void CellArrayEnd();
42  void Close(Option_t *opt = "");
44  void DrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt,
45  Int_t mode, Int_t border, Int_t dark, Int_t light);
48  void DrawPS(Int_t n, Float_t *xw, Float_t *yw);
49  void DrawPS(Int_t n, Double_t *xw, Double_t *yw);
50  void NewPage();
51  void Open(const char *filename, Int_t type = -111);
52  void Text(Double_t x, Double_t y, const char *string);
53  void Text(Double_t x, Double_t y, const wchar_t *string);
54  void SetColor(Float_t r, Float_t g, Float_t b);
55  void *GetStream() const { return (void*)fImage; }
56  void SetType(Int_t type = -111) { fType = type; }
57  Int_t GetType() const { return fType; }
58  TImage *GetImage() const { return fImage; }
59 
60  ClassDef(TImageDump,0) // create image in batch mode
61 };
62 
63 #endif
void DrawDashPolyLine(Int_t npoints, TPoint *pt, UInt_t nDash, const char *pDash, const char *col, UInt_t thick)
draw dashed polyline
Definition: TImageDump.cxx:621
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2)
cell array begin
Definition: TImageDump.cxx:714
void CellArrayEnd()
Cell array end.
Definition: TImageDump.cxx:756
void Close(Option_t *opt="")
Close a image file.
Definition: TImageDump.cxx:107
TImage * fImage
Image.
Definition: TImageDump.h:26
float Float_t
Definition: RtypesCore.h:53
const char Option_t
Definition: RtypesCore.h:62
#define H(x, y, z)
void Text(Double_t x, Double_t y, const char *string)
Draw text.
Definition: TImageDump.cxx:659
int Int_t
Definition: RtypesCore.h:41
void SetType(Int_t type=-111)
Definition: TImageDump.h:56
An abstract interface to image processing library.
Definition: TImage.h:37
TImage * GetImage() const
Definition: TImageDump.h:58
static const double x2[5]
Double_t x[n]
Definition: legend1.C:17
#define ClassDef(name, id)
Definition: Rtypes.h:254
void NewPage()
new page
Definition: TImageDump.cxx:643
TImageDump()
Default constructor.
Definition: TImageDump.cxx:54
void DrawPS(Int_t n, Float_t *xw, Float_t *yw)
not used
Definition: TImageDump.cxx:611
Int_t GetType() const
Definition: TImageDump.h:57
void SetColor(Float_t r, Float_t g, Float_t b)
Set color with its R G B components.
Definition: TImageDump.cxx:786
Definition: TPoint.h:33
Int_t XtoPixel(Double_t x)
x to pixel
Definition: TImageDump.cxx:793
TPaveText * pt
TRandom2 r(17)
void * GetStream() const
Definition: TImageDump.h:55
unsigned int UInt_t
Definition: RtypesCore.h:42
virtual ~TImageDump()
destructor
Definition: TImageDump.cxx:94
Save canvas as an image (GIF, JPEG, PNG, XPM, TIFF etc.).
Definition: TImageDump.h:24
Int_t fType
PostScript workstation type.
Definition: TImageDump.h:27
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.
Definition: TImageDump.cxx:195
void Open(const char *filename, Int_t type=-111)
Open a image file.
Definition: TImageDump.cxx:83
static const double x1[5]
double Double_t
Definition: RtypesCore.h:55
void DrawPolyMarker(Int_t n, Float_t *x, Float_t *y)
not used
Definition: TImageDump.cxx:276
int type
Definition: TGX11.cxx:120
Double_t y[n]
Definition: legend1.C:17
The color creation and management class.
Definition: TColor.h:23
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
Definition: TRolke.cxx:630
TVirtualPS is an abstract interface to Postscript, PDF, SVG.
Definition: TVirtualPS.h:40
Int_t YtoPixel(Double_t y)
y to pixel
Definition: TImageDump.cxx:801
const Int_t n
Definition: legend1.C:16
void CellArrayFill(Int_t r, Int_t g, Int_t b)
Cell array fill.
Definition: TImageDump.cxx:743
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
Draw a Box.
Definition: TImageDump.cxx:121