ROOT logo
ROOT » GRAF2D » POSTSCRIPT » TImageDump

class TImageDump: public TVirtualPS


TImageDump

save canvas as an image (GIF, JPEG, PNG, XPM, TIFF etc.)
in batch mode.  Example:

$ root -b
root [0] .x hsimple.C
root [1] c1->Print("c1.gif");

TImageDump can be used in any mode (batch, interactive) as follows

TCanvas *c1;
TImageDump *imgdump = new TImageDump("test.png");
c1->Paint();
imgdump->Close();



Function Members (Methods)

public:
TImageDump()
TImageDump(const char* filename, Int_t type = -111)
virtual~TImageDump()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
virtual voidCellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2)
virtual voidCellArrayEnd()
virtual voidCellArrayFill(Int_t r, Int_t g, Int_t b)
static TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTNamed::Clear(Option_t* option = "")
virtual TObject*TNamed::Clone(const char* newname = "") const
virtual voidClose(Option_t* opt = "")
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
virtual voidTObject::Delete(Option_t* option = "")MENU
Int_tTAttLine::DistancetoLine(Int_t px, Int_t py, Double_t xp1, Double_t yp1, Double_t xp2, Double_t yp2)
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidDrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidDrawFrame(Double_t xl, Double_t yl, Double_t xt, Double_t yt, Int_t mode, Int_t border, Int_t dark, Int_t light)
virtual voidDrawPolyMarker(Int_t n, Float_t* x, Float_t* y)
virtual voidDrawPolyMarker(Int_t n, Double_t* x, Double_t* y)
virtual voidDrawPS(Int_t n, Float_t* xw, Float_t* yw)
virtual voidDrawPS(Int_t n, Double_t* xw, Double_t* yw)
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
virtual voidTNamed::FillBuffer(char*& buffer)
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Color_tTAttFill::GetFillColor() const
virtual Style_tTAttFill::GetFillStyle() const
virtual const char*TObject::GetIconName() const
TImage*GetImage() const
virtual Color_tTAttLine::GetLineColor() const
virtual Style_tTAttLine::GetLineStyle() const
virtual Width_tTAttLine::GetLineWidth() const
virtual Color_tTAttMarker::GetMarkerColor() const
virtual Size_tTAttMarker::GetMarkerSize() const
virtual Style_tTAttMarker::GetMarkerStyle() const
virtual const char*TNamed::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
virtual void*GetStream() const
virtual Short_tTAttText::GetTextAlign() const
virtual Float_tTAttText::GetTextAngle() const
virtual Color_tTAttText::GetTextColor() const
virtual Font_tTAttText::GetTextFont() const
virtual Float_tTAttText::GetTextSize() const
virtual const char*TNamed::GetTitle() const
virtual Int_tGetType() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTNamed::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTNamed::IsSortable() const
virtual Bool_tTAttFill::IsTransparent() const
Bool_tTObject::IsZombie() const
virtual voidTNamed::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTAttLine::Modify()
virtual voidNewPage()
virtual Bool_tTObject::Notify()
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
virtual voidOpen(const char* filename, Int_t type = -111)
static voidTObject::operator delete(void* ptr)
static voidTObject::operator delete(void* ptr, void* vp)
static voidTObject::operator delete[](void* ptr)
static voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TNamed&TNamed::operator=(const TNamed& rhs)
virtual voidTObject::Paint(Option_t* option = "")
virtual voidTObject::Pop()
virtual voidTNamed::Print(Option_t* option = "") const
virtual voidTVirtualPS::PrintFast(Int_t nch, const char* string = "")
virtual voidTVirtualPS::PrintRaw(Int_t len, const char* str)
virtual voidTVirtualPS::PrintStr(const char* string = "")
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual voidTAttFill::ResetAttFill(Option_t* option = "")
virtual voidTAttLine::ResetAttLine(Option_t* option = "")
virtual voidTAttMarker::ResetAttMarker(Option_t* toption = "")
virtual voidTAttText::ResetAttText(Option_t* toption = "")
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTAttFill::SaveFillAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1001)
virtual voidTAttLine::SaveLineAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t widdef = 1)
virtual voidTAttMarker::SaveMarkerAttributes(ostream& out, const char* name, Int_t coldef = 1, Int_t stydef = 1, Int_t sizdef = 1)
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual voidTAttText::SaveTextAttributes(ostream& out, const char* name, Int_t alidef = 12, Float_t angdef = 0, Int_t coldef = 1, Int_t fondef = 61, Float_t sizdef = 1)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidSetColor(Float_t r, Float_t g, Float_t b)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
virtual voidTAttFill::SetFillAttributes()MENU
virtual voidTAttFill::SetFillColor(Color_t fcolor)
virtual voidTAttFill::SetFillColorAlpha(Color_t fcolor, Float_t falpha)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
virtual voidTAttLine::SetLineAttributes()MENU
virtual voidTAttLine::SetLineColor(Color_t lcolor)
virtual voidTAttLine::SetLineColorAlpha(Color_t lcolor, Float_t lalpha)
virtual voidTAttLine::SetLineStyle(Style_t lstyle)
virtual voidTAttLine::SetLineWidth(Width_t lwidth)
virtual voidTAttMarker::SetMarkerAttributes()MENU
virtual voidTAttMarker::SetMarkerColor(Color_t mcolor = 1)
virtual voidTAttMarker::SetMarkerColorAlpha(Color_t mcolor, Float_t malpha)
virtual voidTAttMarker::SetMarkerSize(Size_t msize = 1)
virtual voidTAttMarker::SetMarkerStyle(Style_t mstyle = 1)
virtual voidTNamed::SetName(const char* name)MENU
virtual voidTNamed::SetNameTitle(const char* name, const char* title)
static voidTObject::SetObjectStat(Bool_t stat)
virtual voidTVirtualPS::SetStream(ofstream* os)
virtual voidTAttText::SetTextAlign(Short_t align = 11)
virtual voidTAttText::SetTextAngle(Float_t tangle = 0)MENU
virtual voidTAttText::SetTextAttributes()MENU
virtual voidTAttText::SetTextColor(Color_t tcolor = 1)
virtual voidTAttText::SetTextColorAlpha(Color_t tcolor, Float_t talpha)
virtual voidTAttText::SetTextFont(Font_t tfont = 62)
virtual voidTAttText::SetTextSize(Float_t tsize = 1)
virtual voidTAttText::SetTextSizePixels(Int_t npixels)
virtual voidTNamed::SetTitle(const char* title = "")MENU
virtual voidSetType(Int_t type = -111)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector&)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidText(Double_t x, Double_t y, const char* string)
virtual voidText(Double_t x, Double_t y, const wchar_t* string)
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
virtual voidTVirtualPS::WriteInteger(Int_t i, Bool_t space = kTRUE)
virtual voidTVirtualPS::WriteReal(Float_t r, Bool_t space = kTRUE)
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidDrawDashPolyLine(Int_t npoints, TPoint* pt, UInt_t nDash, const char* pDash, const char* col, UInt_t thick)
voidTObject::MakeZombie()
Int_tXtoPixel(Double_t x)
Int_tYtoPixel(Double_t y)

Data Members

protected:
char*TVirtualPS::fBufferFile buffer
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
TImage*fImageimage
const char*TVirtualPS::fImplicitCREscEscape symbol before enforced new line
Int_tTVirtualPS::fLenBufferBuffer length
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Color_tTAttMarker::fMarkerColorMarker color index
Size_tTAttMarker::fMarkerSizeMarker size
Style_tTAttMarker::fMarkerStyleMarker style
Int_tTVirtualPS::fNByteNumber of bytes written in the file (PDF)
TStringTNamed::fNameobject identifier
Bool_tTVirtualPS::fPrintedTrue when a page must be printed
Int_tTVirtualPS::fSizBufferBuffer size
ofstream*TVirtualPS::fStreamFile stream identifier
Short_tTAttText::fTextAlignText alignment
Float_tTAttText::fTextAngleText angle
Color_tTAttText::fTextColorText color index
Font_tTAttText::fTextFontText font number
Float_tTAttText::fTextSizeText size
TStringTNamed::fTitleobject title
Int_tfTypePostScript workstation type

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TImageDump()
 Default SVG constructor
TImageDump(const char* filename, Int_t type = -111)
 Initialize batch image interface

  fname : image file name

    The possible workstation types are:
  111 - Portrait
  112 - Landscape
  114 - preview, keep in memory (do not write on delete)
void Open(const char* filename, Int_t type = -111)
 Open a image file
~TImageDump()
 destructor
void Close(Option_t* opt = "")
 Close a image file
void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2)
 Draw a Box
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

 mode = -1  the box looks as it is behind the screen
 mode =  1  the box looks as it is in front of the screen
 border is the border size in already pre-computed dark is the
 color for the dark part of the frame light is the color for the light
 part of the frame
void DrawPolyMarker(Int_t n, Float_t* x, Float_t* y)
 not used
void DrawPolyMarker(Int_t n, Double_t* x, Double_t* y)
 draw polymarker
void DrawPS(Int_t n, Double_t* xw, Double_t* yw)
 This function defines a path with xw and yw and draw it according the
 value of nn:

  If nn > 0 a line is drawn.
  If nn < 0 a closed polygon is drawn.
void DrawPS(Int_t n, Float_t* xw, Float_t* yw)
 not used
void DrawDashPolyLine(Int_t npoints, TPoint* pt, UInt_t nDash, const char* pDash, const char* col, UInt_t thick)
 draw dashed polyline
void NewPage()
 new page
void Text(Double_t x, Double_t y, const char* string)
 Draw text

 x: x position of the text
 y: y position of the text
void Text(Double_t x, Double_t y, const wchar_t* string)
 Draw text

 x: x position of the text
 y: y position of the text
void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2)
cell array begin
void CellArrayFill(Int_t r, Int_t g, Int_t b)
Cell array fill
void CellArrayEnd()
Cell array end
void SetColor(Float_t r, Float_t g, Float_t b)
 Set color with its R G B components

  r: % of red in [0,1]
  g: % of green in [0,1]
  b: % of blue in [0,1]
Int_t XtoPixel(Double_t x)
 x to pixel
Int_t YtoPixel(Double_t y)
 y to pixel
void * GetStream() const
{ return (void*)fImage; }
void SetType(Int_t type = -111)
{ fType = type; }
Int_t GetType() const
{ return fType; }
TImage * GetImage() const
{ return fImage; }