library: libPostscript
#include "TImageDump.h"

TImageDump


class description - source file - inheritance tree (.pdf)

class TImageDump : public TVirtualPS

Inheritance Chart:
TObject
<-
TNamed
TAttLine
TAttFill
TAttMarker
TAttText
<-
TVirtualPS
<-
TImageDump

    public:
TImageDump() TImageDump(const char* filename, Int_t type = -111) TImageDump(const TImageDump&) virtual ~TImageDump() virtual void CellArrayBegin(Int_t W, Int_t H, Double_t x1, Double_t x2, Double_t y1, Double_t y2) virtual void CellArrayEnd() virtual void CellArrayFill(Int_t r, Int_t g, Int_t b) static TClass* Class() virtual void Close(Option_t* opt = "") virtual void DrawBox(Double_t x1, Double_t y1, Double_t x2, Double_t y2) virtual 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) virtual void DrawPolyMarker(Int_t n, Float_t* x, Float_t* y) virtual void DrawPolyMarker(Int_t n, Double_t* x, Double_t* y) virtual void DrawPS(Int_t n, Float_t* xw, Float_t* yw) virtual void DrawPS(Int_t n, Double_t* xw, Double_t* yw) TImage* GetImage() const virtual void* GetStream() const virtual Int_t GetType() const virtual TClass* IsA() const virtual void NewPage() virtual void Open(const char* filename, Int_t type = -111) TImageDump& operator=(const TImageDump&) virtual void SetColor(Float_t r, Float_t g, Float_t b) virtual void SetType(Int_t type = -111) virtual void ShowMembers(TMemberInspector& insp, char* parent) virtual void Streamer(TBuffer& b) void StreamerNVirtual(TBuffer& b) virtual void Text(Double_t x, Double_t y, const char* string)

Data Members


    protected:
TImage* fImage image Int_t fType PostScript workstation type

Class Description

                                                                      
 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();                                                 
                                                                      
                                                                      


TImageDump() : TVirtualPS()
 Default SVG constructor

TImageDump(const char *fname, Int_t wtype) : TVirtualPS(fname, wtype)
 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 *fname, Int_t type)
 Open a image file

~TImageDump()
 destructor

void Close(Option_t *)
 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 x1, Double_t y1, Double_t x2, Double_t y2, Int_t mode, Int_t bordersize, 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 SVG units 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, Float_t *, Float_t *)
 not used

void DrawPolyMarker(Int_t n, Double_t *xw, Double_t *yw)
 draw polymarker

void DrawPS(Int_t nn, Double_t *x, Double_t *y)
 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, Float_t *, Float_t *)
 not used

void NewPage()
 Start new page. This function initialize the pad conversion
 coefficients and ouput the <svg> directive which is close later in the
 the function Close.

void Text(Double_t xx, Double_t yy, const char *chars)
 Draw text

 xx: x position of the text
 yy: 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)

void CellArrayFill(Int_t r, Int_t g, Int_t b)

void CellArrayEnd()

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]



Inline Functions


              void* GetStream() const
               void SetType(Int_t type = -111)
              Int_t GetType() const
            TImage* GetImage() const
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
         TImageDump TImageDump(const TImageDump&)
        TImageDump& operator=(const TImageDump&)


Author: Valeriy Onuchin
Last update: root/postscript:$Name: $:$Id: TImageDump.cxx,v 1.11 2005/09/02 10:16:13 brun Exp $
Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *


ROOT page - Class index - Class Hierarchy - Top of the page

This page has been automatically generated. If you have any comments or suggestions about the page layout send a mail to ROOT support, or contact the developers with any questions or problems regarding ROOT.