library: libPostscript
#include "TPDF.h"

TPDF


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

class TPDF : public TVirtualPS

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

    public:
TPDF() TPDF(const char* filename, Int_t type = -111) TPDF(const TPDF&) virtual ~TPDF() 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 = "") Double_t CMtoPDF(Double_t u) 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) void DrawHatch(Float_t dy, Float_t angle, Int_t n, Float_t* x, Float_t* y) void DrawHatch(Float_t dy, Float_t angle, Int_t n, Double_t* x, Double_t* y) void DrawPolyLine(Int_t n, TPoints* xy) void DrawPolyLineNDC(Int_t n, TPoints* uv) 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) void FontEncode() virtual TClass* IsA() const void LineTo(Double_t x, Double_t y) void MoveTo(Double_t x, Double_t y) void NewObject(Int_t n) virtual void NewPage() void Off() void On() virtual void Open(const char* filename, Int_t type = -111) TPDF& operator=(const TPDF&) void PatternEncode() virtual void PrintFast(Int_t nch, const char* string = "") virtual void PrintStr(const char* string = "") void Range(Float_t xrange, Float_t yrange) void SetColor(Int_t color = 1) virtual void SetColor(Float_t r, Float_t g, Float_t b) virtual void SetFillColor(Color_t cindex = 1) void SetFillPatterns(Int_t ipat, Int_t color) virtual void SetLineColor(Color_t cindex = 1) virtual void SetLineStyle(Style_t linestyle = 1) virtual void SetLineWidth(Width_t linewidth = 1) virtual void SetMarkerColor(Color_t cindex = 1) virtual void SetTextColor(Color_t cindex = 1) 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) void TextNDC(Double_t u, Double_t v, const char* string) Double_t UtoPDF(Double_t u) Double_t VtoPDF(Double_t v) void WriteCompressedBuffer() Double_t XtoPDF(Double_t x) Double_t YtoPDF(Double_t y)

Data Members


    protected:
Float_t fRed Per cent of red Float_t fGreen Per cent of green Float_t fBlue Per cent of blue Float_t fXsize Page size along X Float_t fYsize Page size along Y Int_t fType Workstation type used to know if the PDF is open Int_t fPageFormat Page format (A4, Letter etc ...) Int_t fPageOrientation Page orientation (Portrait, Landscape) Int_t fStartStream Int_t* fObjPos Objets position Int_t fObjPosSize Real size of fObjPos Int_t fNbObj Number of objects Int_t fNbPage Number of pages Bool_t fCompress True when fBuffer must be compressed Bool_t fRange True when a range has been defined

Class Description

                                                                      
 TPDF                                                                 
                                                                      
 Graphics interface to PDF.                                           
                                                                      


TPDF() : TVirtualPS()
 Default PDF constructor

TPDF(const char *fname, Int_t wtype) : TVirtualPS(fname, wtype)
 Initialize the PDF interface

  fname : PDF file name
  wtype : PDF workstation type. Not used in the PDF driver. But as TPDF
          inherits from TVirtualPS it should be kept. Anyway it is not
          necessary to specify this parameter at creation time because it
          has a default value (which is ignore in the PDF case).

~TPDF()
 Default PDF destructor

void CellArrayBegin(Int_t, Int_t, Double_t, Double_t, Double_t, Double_t)

void CellArrayFill(Int_t, Int_t, Int_t)

void CellArrayEnd()

void Close(Option_t *)
 Close a PDF 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  box looks as it is behind the screen
 mode =  1  box looks as it is in front of the screen
 border is the border size in already precomputed PostScript units
 dark  is the color for the dark part of the frame
 light is the color for the light part of the frame

void DrawHatch(Float_t, Float_t, Int_t, Float_t *, Float_t *)
 Draw Fill area with hatch styles

void DrawHatch(Float_t, Float_t, Int_t, Double_t *, Double_t *)
 Draw Fill area with hatch styles

void DrawPolyLine(Int_t nn, TPoints *xy)
 Draw a PolyLine

  Draw a polyline through  the points xy.
  If NN=1 moves only to point x,y.
  If NN=0 the x,y are  written  in the PDF file
     according to the current transformation.
  If NN>0 the line is clipped as a line.
  If NN<0 the line is clipped as a fill area.

void DrawPolyLineNDC(Int_t nn, TPoints *xy)
 Draw a PolyLine in NDC space

  Draw a polyline through  the points  xy.
  If NN=1 moves only to point x,y.
  If NN=0 the x,y are  written  in the PDF        file
     according to the current transformation.
  If NN>0 the line is clipped as a line.
  If NN<0 the line is clipped as a fill area.

void DrawPolyMarker(Int_t n, Float_t *xw, Float_t *yw)
 Draw markers at the n WC points xw, yw

void DrawPolyMarker(Int_t n, Double_t *xw, Double_t *yw)
 Draw markers at the n WC points xw, yw

void DrawPS(Int_t nn, Float_t *xw, Float_t *yw)
 Draw a PolyLine

  Draw a polyline through the points xw,yw.
  If nn=1 moves only to point xw,yw.
  If nn=0 the XW(1) and YW(1) are  written  in the PostScript file
          according to the current NT.
  If nn>0 the line is clipped as a line.
  If nn<0 the line is clipped as a fill area.

void DrawPS(Int_t nn, Double_t *xw, Double_t *yw)
 Draw a PolyLine

 Draw a polyline through  the points xw,yw.
 If nn=1 moves only to point xw,yw.
 If nn=0 the xw(1) and YW(1) are  written  in the PostScript file
         according to the current NT.
 If nn>0 the line is clipped as a line.
 If nn<0 the line is clipped as a fill area.

void FontEncode()
 Font encoding

void LineTo(Double_t x, Double_t y)
 Draw a line to a new position

void MoveTo(Double_t x, Double_t y)
 Move to a new position

void NewObject(Int_t n)
 Create a new object in the PDF file

void NewPage()
 Start a new PDF page.

void Off()
 Deactivate an already open PDF file

void On()
 Activate an already open PDF file

void Open(const char *fname, Int_t wtype)
 Open a PDF file

void PatternEncode()
 Patterns encoding

void PrintStr(const char *str)
 Output the string str in the output buffer

void PrintFast(Int_t len, const char *str)
 Fast version of Print

void Range(Float_t xsize, Float_t ysize)
 Set the range for the paper in centimetres

void SetColor(Int_t color)
 Set color with its color index

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]

void SetFillColor( Color_t cindex )
 Set color index for fill areas

void SetFillPatterns(Int_t ipat, Int_t color)
 Set the fill patterns (1 to 25) for fill areas

void SetLineColor( Color_t cindex )
 Set color index for lines

void SetLineStyle(Style_t linestyle)
 Change the line style

 linestyle = 2 dashed
           = 3 dotted
           = 4 dash-dotted
           = else solid (1 in is used most of the time)

void SetLineWidth(Width_t linewidth)
 Change the line width

void SetMarkerColor( Color_t cindex )
 Set color index for markers.

void SetTextColor( Color_t cindex )
 Set color index for text

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
 chars: text to be drawn

void TextNDC(Double_t u, Double_t v, const char *chars)
 Write a string of characters in NDC

Double_t UtoPDF(Double_t u)
 Convert U from NDC coordinate to PDF

Double_t VtoPDF(Double_t v)
 Convert V from NDC coordinate to PDF

Double_t XtoPDF(Double_t x)
 Convert X from world coordinate to PDF

Double_t YtoPDF(Double_t y)
 Convert Y from world coordinate to PDF

void WriteCompressedBuffer()
 Write the buffer in a compressed way



Inline Functions


           Double_t CMtoPDF(Double_t u)
            TClass* Class()
            TClass* IsA() const
               void ShowMembers(TMemberInspector& insp, char* parent)
               void Streamer(TBuffer& b)
               void StreamerNVirtual(TBuffer& b)
               TPDF TPDF(const TPDF&)
              TPDF& operator=(const TPDF&)


Author: Olivier Couet
Last update: root/postscript:$Name: $:$Id: TPDF.cxx,v 1.0
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.