library: libPostscript
#include "TPostScript.h"

TPostScript


class description - header file - source file
viewCVS header - viewCVS source

class TPostScript: public TVirtualPS

Inheritance Inherited Members Includes Libraries
Class Charts

Function Members (Methods)

Display options:
Show inherited
Show non-public
public:
TPostScript()
TPostScript(const TPostScript&)
TPostScript(const char* filename, Int_t type = -111)
virtual~TPostScript()
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 = "")
Int_tCMtoPS(Double_t u)
virtual Int_tTNamed::Compare(const TObject* obj) const
virtual voidTNamed::Copy(TObject& named) const
voidDefineMarkers()
virtual voidTObject::Delete(Option_t* option = "")
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() const
virtual TObject*TObject::DrawClone(Option_t* option = "") const
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)
voidDrawHatch(Float_t dy, Float_t angle, Int_t n, Float_t* x, Float_t* y)
voidDrawHatch(Float_t dy, Float_t angle, Int_t n, Double_t* x, Double_t* y)
voidDrawPolyLine(Int_t n, TPoints* xy)
voidDrawPolyLineNDC(Int_t n, TPoints* uv)
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() const
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
voidFontEncode()
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
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*TVirtualPS::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_tTVirtualPS::GetType() 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
voidInitialize()
virtual voidTObject::Inspect() const
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
voidMakeGreek()
voidTObject::MayNotUse(const char* method) const
virtual voidTAttLine::Modify()
voidMovePS(Int_t x, Int_t y)
virtual voidNewPage()
virtual Bool_tTObject::Notify()
voidOff()
voidOn()
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)
TPostScript&operator=(const TPostScript&)
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::PrintStr(const char* string = "")
voidRange(Float_t xrange, Float_t yrange)
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 = "") const
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 = "")
voidSaveRestore(Int_t flag)
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)
voidSetColor(Int_t color = 1)
virtual voidSetColor(Float_t r, Float_t g, Float_t b)
virtual voidTObject::SetDrawOption(Option_t* option = "")
static voidTObject::SetDtorOnly(void* obj)
virtual voidTAttFill::SetFillAttributes()
virtual voidSetFillColor(Color_t cindex = 1)
voidSetFillPatterns(Int_t ipat, Int_t color)
virtual voidTAttFill::SetFillStyle(Style_t fstyle)
virtual voidTAttLine::SetLineAttributes()
virtual voidSetLineColor(Color_t cindex = 1)
voidSetLineJoin(Int_t linejoin = 0)
voidSetLineScale(Float_t scale = 3)
virtual voidSetLineStyle(Style_t linestyle = 1)
virtual voidSetLineWidth(Width_t linewidth = 1)
virtual voidTAttMarker::SetMarkerAttributes()
virtual voidSetMarkerColor(Color_t cindex = 1)
virtual voidTAttMarker::SetMarkerSize(Size_t msize = 1)
virtual voidTAttMarker::SetMarkerStyle(Style_t mstyle = 1)
virtual voidTNamed::SetName(const char* name)
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)
virtual voidTAttText::SetTextAttributes()
virtual voidSetTextColor(Color_t cindex = 1)
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 = "")
virtual voidTVirtualPS::SetType(Int_t = -111)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual voidShowMembers(TMemberInspector& insp, char* parent)
virtual Int_tTNamed::Sizeof() const
virtual voidStreamer(TBuffer& b)
voidStreamerNVirtual(TBuffer& 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)
voidTextNDC(Double_t u, Double_t v, const char* string)
virtual voidTObject::UseCurrentStyle()
Int_tUtoPS(Double_t u)
Int_tVtoPS(Double_t v)
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)
Int_tXtoPS(Double_t x)
Int_tYtoPS(Double_t y)
voidZone()
protected:
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
voidTObject::MakeZombie()

Data Members

public:
enum TObject::EStatusBits { kCanDelete
kMustCleanup
kObjInCanvas
kIsReferenced
kHasUUID
kCannotPick
kNoContextMenu
kInvalidObject
};
enum TObject::[unnamed] { kIsOnHeap
kNotDeleted
kZombie
kBitMask
kSingleKey
kOverwrite
kWriteDelete
};
protected:
Float_tfX1vX bottom left corner of paper
Float_tfY1vY bottom left corner of paper
Float_tfX2vX top right corner of paper
Float_tfY2vY top right corner of paper
Float_tfX1w
Float_tfY1w
Float_tfX2w
Float_tfY2w
Float_tfDXC
Float_tfDYC
Float_tfXC
Float_tfYC
Float_tfFX
Float_tfFY
Float_tfXVP1
Float_tfXVP2
Float_tfYVP1
Float_tfYVP2
Float_tfXVS1
Float_tfXVS2
Float_tfYVS1
Float_tfYVS2
Float_tfXsizePage size along X
Float_tfYsizePage size along Y
Float_tfMaxsizeLargest dimension of X and Y
Float_tfRedPer cent of red
Float_tfGreenPer cent of green
Float_tfBluePer cent of blue
Float_tfLineScaleLine width scale factor
Int_tfLineJoinAppearance of joining lines
Int_tfSaveNumber of gsave for restore
Int_tfNXzoneNumber of zones along X
Int_tfNYzoneNumber of zones along Y
Int_tfIXzoneCurrent zone along X
Int_tfIYzoneCurrent zone along Y
Float_tfMarkerSizeCurcurrent transformed value of marker size
Int_tfCurrentColorcurrent Postscript color index
Int_tfNpagesnumber of pages
Int_tfTypePostScript workstation type
Int_tfModePostScript mode
Int_tfClipClipping mode
Bool_tfBoundingBoxTrue for Encapsulated PostScript
Bool_tfClearTrue when page must be cleared
Bool_tfClipStatusClipping Indicator
Bool_tfRangeTrue when a range has been defined
Bool_tfZoneZone indicator
charfPatterns[32]Indicate if pattern n is defined
Int_tfNbinCTNumber of entries in the current Cell Array
Int_tfNbCellWNumber of boxes per line
Int_tfNbCellLineNumber of boxes in the current line
Int_tfMaxLinesMaximum number of lines in a PS array
Int_tfLastCellRedLast red value
Int_tfLastCellGreenLast green value
Int_tfLastCellBlueLast blue value
Int_tfNBSameColorCellNumber of boxes with the same color
static Int_tfgLineJoinAppearance of joining lines
Int_tTVirtualPS::fNByteNumber of bytes written in the file (PDF)
Int_tTVirtualPS::fLenBufferBuffer length
Int_tTVirtualPS::fSizBufferBuffer size
Bool_tTVirtualPS::fPrintedTrue when a page must be printed
ofstream*TVirtualPS::fStreamFile stream identifier
char*TVirtualPS::fBufferFile buffer
TStringTNamed::fNameobject identifier
TStringTNamed::fTitleobject title
Color_tTAttLine::fLineColorline color
Style_tTAttLine::fLineStyleline style
Width_tTAttLine::fLineWidthline width
Color_tTAttFill::fFillColorfill area color
Style_tTAttFill::fFillStylefill area style
Color_tTAttMarker::fMarkerColorMarker color index
Style_tTAttMarker::fMarkerStyleMarker style
Size_tTAttMarker::fMarkerSizeMarker size
Float_tTAttText::fTextAngleText angle
Float_tTAttText::fTextSizeText size
Short_tTAttText::fTextAlignText alignment
Color_tTAttText::fTextColorText color index
Font_tTAttText::fTextFontText font number

Class Description

                                                                      
 TPostScript                                                          
                                                                      
 Graphics interface to PostScript.                                    
                                                                      
 This code was initially developed in the context of HIGZ and PAW     
 by Olivier Couet and Pierre Juillot.                                 
 It has been converted to a C++ class by Rene Brun.                   
                                                                      
/*

To generate a Postscript (or encapsulated ps) file corresponding to a single image in a canvas, you can:

Special characters

The following characters have a special action on the Postscript file:
       `   : go to Greek
       '   : go to special
       ~   : go to ZapfDingbats
       ?   : go to subscript
       ^   : go to superscript
       !   : go to normal level of script
       &   : backspace one character
       #   : end of Greek or of ZapfDingbats

These special characters are printed as such on the screen. To generate one of these characters on the Postscript file, you must escape it with the escape character "@".

The use of these special characters is illustrated in several macros referenced by the TPostScript constructor.

Output type

The output type allows to define how the PostScript output will looks like. It allows to define the page format (A4, Legal etc..), the orientation (Portrait, Landscape) and the number of images (zones) per page. The output type has the following form:
                        [Format][Nx][Ny][Type]
Where:

Making several pictures in the same Postscript file: case 1

The following macro is an example illustrating how to open a Postscript file and draw several pictures. The generation of a new Postscript page is automatic when TCanvas::Clear is called by object->Draw().

{
   TFile f("hsimple.root");
   TCanvas c1("c1","canvas",800,600);

   // select postscript output type
   // type = 111   portrait  ps
   // type = 112   landscape ps
   // type = 113   eps
   Int_t type = 111;

   // create a postscript file and set the paper size
   TPostScript ps("test.ps",type);
   ps.Range(16,24);  //set x,y of printed page

   // draw 3 histograms from file hsimple.root on separate pages
   hpx->Draw();
   c1.Update();      //force drawing in a macro
   hprof->Draw();
   c1.Update();
   hpx->Draw("lego1");
   c1.Update();
   ps.Close();
}

Making several pictures in the same Postscript file: case 2

This example shows 2 pages. The canvas is divided. TPostScript::NewPage must be called before starting a new picture. object->Draw does not clear the canvas in this case because we clear only the pads and not the main canvas. Note that c1->Update must be called at the end of the first picture

{
   TFile *f1 = new TFile("hsimple.root");
   TCanvas *c1 = new TCanvas("c1");
   TPostScript *ps = new TPostScript("file.ps",112);
   c1->Divide(2,1);
// picture 1
   ps->NewPage();
   c1->cd(1);
   hpx->Draw();
   c1->cd(2);
   hprof->Draw();
   c1->Update();

// picture 2
   ps->NewPage();
   c1->cd(1);
   hpxpy->Draw();
   c1->cd(2);
   ntuple->Draw("px");
   c1->Update();
   ps->Close();

// invoke Postscript viewer
   gSystem->Exec("gs file.ps");
}

Color Model

TPostScript support two color model RGB and CMYK. CMY and CMYK models are subtractive color models unlike RGB which is an additive. They are mainly used for printing purposes. CMY means Cyan Magenta Yellow to convert RGB to CMY it is enough to do: C=1-R, M=1-G and Y=1-B. CMYK has one more component K (black). The conversion from RGB to CMYK is: Double_t Black = TMath::Min(TMath::Min(1-Red,1-Green),1-Blue); Double_t Cyan = (1-Red-Black)/(1-Black); Double_t Magenta = (1-Green-Black)/(1-Black); Double_t Yellow = (1-Blue-Black)/(1-Black); CMYK add the black component which allows to have a better quality for black printing. PostScript support the CMYK model. To change the color model use gStyle->SetColorModelPS(c). c = 0 means TPostScript will use RGB color model (default) c = 1 means TPostScript will use CMYK color model */
 The picture below shows fancy text with national accents or
 subscripts and superscripts. This picture has been generated by
 the macro 
psexam.


     The two following tables list the correspondence between the typed
     character and its interpretation using the special characters given
     in TPostScript::Text. These tables are screen copies. True and better
     resolution PostScript files can be seen at 
psexam, pstable1 and pstable2.
 The macro 
pstable
 has been used to generate the two PostScript tables.





TPostScript()
 Default PostScript constructor
TPostScript(const char *fname, Int_t wtype)
 Initialize the PostScript interface

  fname : PostScript file name
  wtype : PostScript workstation type


  The possible workstation types are:
     111 ps  Portrait
     112 ps  Landscape
     113 eps
void Open(const char *fname, Int_t wtype)
 Open a PostScript file
~TPostScript()
 Default PostScript destructor
void Close(Option_t *)
 Close a PostScript file
void On()
 Activate an already open PostScript file
void Off()
 Deactivate an already open PostScript file
void CellArrayBegin(Int_t W, Int_t /*H*/, Double_t x1, Double_t x2, Double_t y1, Double_t y2)
 Draw a Cell Array

 Drawing a PostScript Cell Array is in fact done thanks to three
 procedures: CellArrayBegin, CellArrayFill, and CellArrayEnd.

 CellArrayBegin: Initiate the Cell Array by writing the necessary
                 PostScript procedures and the initial values of the
                 required parameters. The input parameters are:
                 W: number of boxes along the width.
                 H: number of boxes along the height
                 x1,x2,y1,y2: First box coordinates.
 CellArrayFill:  Is called for each box of the Cell Array. The first
                 box is the top left one and the last box is the
                 bottom right one. The input parameters are the Red,
                 Green, and Blue components of the box colour. These
                 Levels are between 0 and 255.
 CellArrayEnd:   Finishes the Cell Array.

 PostScript cannot handle arrays larger than 65535. So the Cell Array
 is drawn in several pieces.
void CellArrayFill(Int_t r, Int_t g, Int_t b)
 Paint the Cell Array
void CellArrayEnd()
 End the Cell Array painting
void DefineMarkers()
 Define the markers
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 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 PostScript 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 PostScript 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 *x, Float_t *y)
 Draw markers at the n WC points x, y
void DrawPolyMarker(Int_t n, Double_t *x, Double_t *y)
 Draw markers at the n WC points x, y
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 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 FontEncode()
 Font Reencoding
void Initialize()
 PostScript Initialisation

 This routine initialize the following PostScript procedures:

 +------------+------------------+-----------------------------------+
 | Macro Name | Input parameters |            Explanation            |
 +------------+------------------+-----------------------------------+
 |     l      | x y              | Draw a line to the x y position   |
 +------------+------------------+-----------------------------------+
 |     m      | x y              | Move to the position x y          |
 +------------+------------------+-----------------------------------+
 |     box    | dx dy x y        | Define a box                      |
 +------------+------------------+-----------------------------------+
 |     bl     | dx dy x y        | Draw a line box                   |
 +------------+------------------+-----------------------------------+
 |     bf     | dx dy x y        | Draw a filled box                 |
 +------------+------------------+-----------------------------------+
 |     sw     | text             | Return string width of text       |
 +------------+------------------+-----------------------------------+
 |     t      | x y              | Translate                         |
 +------------+------------------+-----------------------------------+
 |     r      | angle            | Rotate                            |
 +------------+------------------+-----------------------------------+
 |     rl     | i j              | Roll the stack                    |
 +------------+------------------+-----------------------------------+
 |     d      | x y              | Draw a relative line to x y       |
 +------------+------------------+-----------------------------------+
 |     X      | x                | Draw a relative line to x (y=0)   |
 +------------+------------------+-----------------------------------+
 |     Y      | y                | Draw a relative line to y (x=0)   |
 +------------+------------------+-----------------------------------+
 |     rm     | x y              | Move relatively to x y            |
 +------------+------------------+-----------------------------------+
 |     gr     |                  | Restore the graphic context       |
 +------------+------------------+-----------------------------------+
 |     lw     | lwidth           | Set line width to lwidth          |
 +------------+------------------+-----------------------------------+
 |     sd     | [] 0             | Set dash line define by []        |
 +------------+------------------+-----------------------------------+
 |     s      |                  | Stroke mode                       |
 +------------+------------------+-----------------------------------+
 |     c      | r g b            | Set rgb color to r g b            |
 +------------+------------------+-----------------------------------+
 |     cl     |                  | Close path                        |
 +------------+------------------+-----------------------------------+
 |     f      |                  | Fill the last describe path       |
 +------------+------------------+-----------------------------------+
 |     mXX    | x y              | Draw the marker type XX at (x,y)  |
 +------------+------------------+-----------------------------------+
 |     Zone   | ix iy            | Define the current zone           |
 +------------+------------------+-----------------------------------+
 |     black  |                  | The color is black                |
 +------------+------------------+-----------------------------------+
 |     C      | dx dy x y        | Clipping on                       |
 +------------+------------------+-----------------------------------+
 |     NC     |                  | Clipping off                      |
 +------------+------------------+-----------------------------------+
 |     R      |                  | repeat                            |
 +------------+------------------+-----------------------------------+
void MakeGreek()
 Reencode the Greek (/Symbol) font into the special font (/Special)
void MovePS(Int_t ix, Int_t iy)
 Move to a new position
void NewPage()
 Move to a new PostScript page
void Range(Float_t xsize, Float_t ysize)
 Set the range for the paper in centimeters
void SaveRestore(Int_t flag)
 Compute number of gsaves for restore
 This allows to write the correct number of grestore at the
 end of the PS file.
void SetFillColor( Color_t cindex )
 Set color index for fill areas
void SetFillPatterns(Int_t ipat, Int_t color)
 Patterns definition

 Define the pattern ipat in the current PS file. ipat can vary from
 1 to 25. Together with the pattern, the color (color) in which the
 pattern has to be drawn is also required. A pattern is defined in the
 current PS file only the first time it is used. Some level 2
 Postscript functions are used, so on level 1 printers, patterns will
 not work. This is not a big problem because patterns are
 defined only if they are used, so if they are not used a PS level 1
 file will not be polluted by level 2 features, and in any case the old
 patterns used a lot of memory which made them almost unusable on old
 level 1 printers. Finally we should say that level 1 devices are
 becoming very rare. The official PostScript is now level 3 !
void SetLineColor( Color_t cindex )
 Set color index for lines
void SetLineJoin( Int_t linejoin )
 Set the value of the global parameter TPostScript::fgLineJoin.
 This parameter determines the appearance of joining lines in a PostScript
 output.
 It takes one argument which may be:
   - 0 (miter join)
   - 1 (round join)
   - 2 (bevel join)
 The default value is 0 (miter join).

/* */
void SetLineStyle(Style_t linestyle)
 Change the line style

   linestyle = 2 dashed
             = 3  dotted
             = 4  dash-dotted
              else = solid

 See TStyle::SetLineStyleString for style definition
void SetLineWidth(Width_t linewidth)
 Change the line width
void SetMarkerColor( Color_t cindex )
 Set color index for markers
void SetColor(Int_t color)
 Set the current color.
void SetColor(Float_t r, Float_t g, Float_t b)
 Set directly current color (don't go via TColor).
void SetTextColor( Color_t cindex )
 Set color index for text
void Text(Double_t xx, Double_t yy, const char *chars)
 Write a string of characters

 This routine writes the string chars into a PostScript file
 at position xx,yy in world coordinates.
void TextNDC(Double_t u, Double_t v, const char *chars)
 Write a string of characters in NDC
Int_t UtoPS(Double_t u)
 Convert U from NDC coordinate to PostScript
Int_t VtoPS(Double_t v)
 Convert V from NDC coordinate to PostScript
Int_t XtoPS(Double_t x)
 Convert X from world coordinate to PostScript
Int_t YtoPS(Double_t y)
 Convert Y from world coordinate to PostScript
void Zone()
 Initialize the PostScript page in zones
TPostScript()
Int_t CMtoPS(Double_t u)
{return Int_t(0.5 + 72*u/2.54);}
void SetLineScale(Float_t scale=3)
{fLineScale = scale;}

Author: Rene Brun, Olivier Couet, Pierre Juillot 29/11/94
Last update: root/postscript:$Name: $:$Id: TPostScript.cxx,v 1.68 2006/12/06 17:05:30 couet 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.