EpsfTools Class Reference

#include <epsfutils.h>

Inheritance diagram for EpsfTools:

SPA_epsftools SPA_epsftools SPM_epsftools SPM_epsftools List of all members.

Public Member Functions

 EpsfTools (int paper=A4PAPER)
virtual ~EpsfTools ()
void SetPaperTyp (int paper=A4PAPER)
int open (char *name, int fullpage=FALSE, int typ=-1, int info=-1)
void NIcons (int n=0)
void SetAbbWidth (double mm=FIGNRMWIDTH)
void SetFontSize (double p=FIGNRMFNTSZ)
void FootLine (Scan *s, int force=FALSE)
void init ()
void placeimage ()
void putframe ()
void putline (Scan *s, int x1, int y1, int x2, int y2)
void putcircle (Scan *s, int x1, int y1, int x2, int y2)
int putticks (Scan *s, int OriginZero=TRUE)
void putgrey (Scan *s, Mem2d *m, int autoskl=TRUE, int quick=TRUE, int option=0)
void putbar (Scan *s)
virtual void putsize (Scan *s)
virtual void putmore (Scan *s, char *Title=NULL)
void endimage ()
void close ()
 EpsfTools (int paper=A4PAPER)
virtual ~EpsfTools ()
void SetPaperTyp (int paper=A4PAPER)
int open (char *name, int fullpage=FALSE, int typ=-1, int info=-1)
void NIcons (int n=0)
void SetAbbWidth (double mm=FIGNRMWIDTH)
void SetFontSize (double p=FIGNRMFNTSZ)
void FootLine (Scan *s, int force=FALSE)
void init ()
void placeimage ()
void putframe ()
void putline (Scan *s, int x1, int y1, int x2, int y2)
void putcircle (Scan *s, int x1, int y1, int x2, int y2)
int putticks (Scan *s, int OriginZero=TRUE)
void putgrey (Scan *s, Mem2d *m, int autoskl=TRUE, int quick=TRUE, int option=0)
void putbar (Scan *s)
virtual void putsize (Scan *s)
virtual void putmore (Scan *s, char *Title=NULL)
void endimage ()
void close ()

Protected Attributes

std::ofstream Icf
double Width
double FontSize
gchar * font
gchar * font

Private Member Functions

void makesize (int &Nx, int &Ny)
void tr2picorigin (int Nx, int Ny)
void putheader (int fullpage, int typ, int info)
void putimgdef (Mem2d *m, int y=-1)
void makesize (int &Nx, int &Ny)
void tr2picorigin (int Nx, int Ny)
void putheader (int fullpage, int typ, int info)
void putimgdef (Mem2d *m, int y=-1)

Private Attributes

char EpsfBuffer [32000]
char * fname
int MkTyp
int imgdef
int PicNo
int nPicPage
int page
int papertyp
char * fname

Detailed Description

Definition at line 45 of file epsfutils.h.


Constructor & Destructor Documentation

EpsfTools::EpsfTools int  paper = A4PAPER  ) 
 

Constructor. Only for initializing.

Definition at line 128 of file epsfutils.C.

References FALSE, font, imgdef, NIcons(), papertyp, PicNo, SetAbbWidth(), and SetFontSize().

EpsfTools::~EpsfTools  )  [virtual]
 

Destructor. Only for clean up.

Definition at line 141 of file epsfutils.C.

References close(), and font.

EpsfTools::EpsfTools int  paper = A4PAPER  ) 
 

virtual EpsfTools::~EpsfTools  )  [virtual]
 


Member Function Documentation

void EpsfTools::close  ) 
 

void EpsfTools::close  ) 
 

Definition at line 1022 of file epsfutils.C.

References Icf, nPicPage, and PicNo.

Referenced by MkIconsPI(), and ~EpsfTools().

void EpsfTools::endimage  ) 
 

void EpsfTools::endimage  ) 
 

Definition at line 746 of file epsfutils.C.

References EpsfBuffer, and Icf.

Referenced by MkIconsPI(), and PIPrintPS().

void EpsfTools::FootLine Scan s,
int  force = FALSE
 

void EpsfTools::FootLine Scan s,
int  force = FALSE
 

Definition at line 756 of file epsfutils.C.

References Scan::data, Scan_UserInfo::dateofscan, EpsfBuffer, Icf, nPicPage, PicNo, and SCAN_DATA::ui.

Referenced by MkIconsPI().

void EpsfTools::init  ) 
 

void EpsfTools::init  ) 
 

Definition at line 700 of file epsfutils.C.

References EpsfBuffer, Icf, nPicPage, and PicNo.

Referenced by MkIconsPI().

void EpsfTools::makesize int &  Nx,
int &  Ny
[private]
 

void EpsfTools::makesize int &  Nx,
int &  Ny
[private]
 

Calculate Nx and Ny for resizing the image.

Parameters:
int Nx. Call by reference.
int Ny. Call by reference.

Definition at line 229 of file epsfutils.C.

Referenced by putbar(), putcircle(), putimgdef(), putline(), and putticks().

void EpsfTools::NIcons int  n = 0  )  [inline]
 

Definition at line 52 of file epsfutils.h.

References MkTyp, and nPicPage.

void EpsfTools::NIcons int  n = 0  )  [inline]
 

Definition at line 52 of file epsfutils.h.

References MkTyp, and nPicPage.

Referenced by EpsfTools(), and MkIconsPI().

int EpsfTools::open char *  name,
int  fullpage = FALSE,
int  typ = -1,
int  info = -1
 

int EpsfTools::open char *  name,
int  fullpage = FALSE,
int  typ = -1,
int  info = -1
 

Open file for writing.

Parameters:
A char* for the filename.
int fullpage. ???
int info. ???
Returns:
Returns 0 on success and -1 on failure to open file for writing.

Definition at line 167 of file epsfutils.C.

References ERR_FILEWRITE, ERR_SORRY, fname, Icf, and XSM_SHOW_ALERT.

Referenced by MkIconsPI(), and PIPrintPS().

void EpsfTools::placeimage  ) 
 

void EpsfTools::placeimage  ) 
 

Definition at line 712 of file epsfutils.C.

References A4PAPER, EPSF_XM, EPSF_YM_A4, EPSF_YM_LETTER, EpsfBuffer, FIGNRMWIDTH, Icf, imgdef, MkTyp, nPicPage, papertyp, PicNo, TRUE, and Width.

Referenced by MkIconsPI(), and PIPrintPS().

void EpsfTools::putbar Scan s  ) 
 

void EpsfTools::putbar Scan s  ) 
 

Definition at line 647 of file epsfutils.C.

References AutoSkl(), UnitObj::Base2Usr(), Scan::data, EpsfBuffer, font, Mem2d::GetNx(), Mem2d::GetNy(), makesize(), Scan::mem2d, UnitObj::psSymbol(), R2INT, Scan_Param::rx, SCAN_DATA::s, tr2picorigin(), and SCAN_DATA::Xunit.

Referenced by PIPrintPS().

void EpsfTools::putcircle Scan s,
int  x1,
int  y1,
int  x2,
int  y2
 

void EpsfTools::putcircle Scan s,
int  x1,
int  y1,
int  x2,
int  y2
 

Draw a circle on top of the image. The first coordinate is the center. The second coordinate lies on the circle itself.

Parameters:
Scan *s, int x1, y1, x2, y2.

Definition at line 349 of file epsfutils.C.

References Scan::data, EpsfBuffer, Mem2d::GetNx(), Mem2d::GetNy(), Icf, makesize(), Scan::mem2d, Scan_Param::rx, Scan_Param::ry, SCAN_DATA::s, sqrt(), tr2picorigin(), Scan_Param::x0, and Scan_Param::y0.

void EpsfTools::putframe  ) 
 

void EpsfTools::putframe  ) 
 

Insert a frame aroudn the image into PS-stream.

Definition at line 258 of file epsfutils.C.

References EpsfBuffer, and Icf.

Referenced by MkIconsPI(), and PIPrintPS().

void EpsfTools::putgrey Scan s,
Mem2d m,
int  autoskl = TRUE,
int  quick = TRUE,
int  option = 0
 

void EpsfTools::putgrey Scan s,
Mem2d m,
int  autoskl = TRUE,
int  quick = TRUE,
int  option = 0
 

Definition at line 828 of file epsfutils.C.

References Mem2d::AutoDataSkl(), EpsfBuffer, Mem2d::GetDataVMode(), Mem2d::GetNx(), Mem2d::GetNy(), Icf, putimgdef(), Mem2d::SetDataRange(), and sqrt().

Referenced by MkIconsPI(), and PIPrintPS().

void EpsfTools::putheader int  fullpage,
int  typ,
int  info
[private]
 

void EpsfTools::putheader int  fullpage,
int  typ,
int  info
[private]
 

Insert neccessary EPSF header information into the PS-stream.

Parameters:
int fullpage. ???
int typ. ???
int info. ???

Definition at line 188 of file epsfutils.C.

References A4PAPER, EpsfBuffer, fname, Icf, ID_PRINTI_NONE, ID_PRINTT_CIRC, ID_PRINTT_PLAIN, PACKAGE, papertyp, PSCode, and VERSION.

void EpsfTools::putimgdef Mem2d m,
int  y = -1
[private]
 

void EpsfTools::putimgdef Mem2d m,
int  y = -1
[private]
 

Definition at line 780 of file epsfutils.C.

References EpsfBuffer, Mem2d::GetNx(), Mem2d::GetNy(), Icf, makesize(), and tr2picorigin().

Referenced by putgrey().

void EpsfTools::putline Scan s,
int  x1,
int  y1,
int  x2,
int  y2
 

void EpsfTools::putline Scan s,
int  x1,
int  y1,
int  x2,
int  y2
 

Draw a line on top of the image.

Parameters:
Scan *s, int x1, y1, x2, y2.

Definition at line 282 of file epsfutils.C.

References Scan::data, EpsfBuffer, Mem2d::GetNx(), Mem2d::GetNy(), Icf, makesize(), Scan::mem2d, Scan_Param::rx, Scan_Param::ry, SCAN_DATA::s, tr2picorigin(), Scan_Param::x0, and Scan_Param::y0.

Referenced by PIPrintPS().

virtual void EpsfTools::putmore Scan s,
char *  Title = NULL
[virtual]
 

Reimplemented in SPA_epsftools, and SPA_epsftools.

void EpsfTools::putmore Scan s,
char *  Title = NULL
[virtual]
 

Reimplemented in SPA_epsftools, and SPA_epsftools.

Definition at line 936 of file epsfutils.C.

References Scan::data, Scan_UserInfo::dateofscan, DBG_L2, DBG_L3, font, Scan_UserInfo::host, Icf, Scan_UserInfo::name, Scan_UserInfo::originalname, Scan_UserInfo::type, SCAN_DATA::ui, Scan_UserInfo::user, and XSM_DEBUG.

Referenced by PIPrintPS().

virtual void EpsfTools::putsize Scan s  )  [virtual]
 

Reimplemented in SPA_epsftools, and SPA_epsftools.

void EpsfTools::putsize Scan s  )  [virtual]
 

Reimplemented in SPA_epsftools, and SPA_epsftools.

Definition at line 894 of file epsfutils.C.

References Scan_UserInfo::comment, Scan::data, DBG_L3, SCAN_DATA::display, Scan_Param::dx, Scan_Param::dy, font, Icf, Scan_UserInfo::name, Scan_Param::nx, Scan_Param::ny, Scan_Param::rx, Scan_Param::ry, SCAN_DATA::s, SCAN_DATA::ui, UNIT_SM_PS, UnitObj::UsrString(), Display_Param::vrange_z, XSM_DEBUG, SCAN_DATA::Xunit, SCAN_DATA::Yunit, and SCAN_DATA::Zunit.

Referenced by MkIconsPI(), and PIPrintPS().

int EpsfTools::putticks Scan s,
int  OriginZero = TRUE
 

int EpsfTools::putticks Scan s,
int  OriginZero = TRUE
 

Draw tic marks.

Definition at line 412 of file epsfutils.C.

References UnitObj::Base2Usr(), Scan::data, DBG_L2, EpsfBuffer, font, Mem2d::GetNx(), Mem2d::GetNy(), makesize(), Scan::mem2d, Scan_Param::rx, SCAN_DATA::s, tr2picorigin(), Scan_Param::x0, XSM_DEBUG, and SCAN_DATA::Xunit.

Referenced by MkIconsPI(), and PIPrintPS().

void EpsfTools::SetAbbWidth double  mm = FIGNRMWIDTH  )  [inline]
 

Definition at line 53 of file epsfutils.h.

References Width.

void EpsfTools::SetAbbWidth double  mm = FIGNRMWIDTH  )  [inline]
 

Definition at line 53 of file epsfutils.h.

References Width.

Referenced by EpsfTools(), and PIPrintPS().

void EpsfTools::SetFontSize double  p = FIGNRMFNTSZ  ) 
 

void EpsfTools::SetFontSize double  p = FIGNRMFNTSZ  ) 
 

Insert font size selection in PS-stream.

Definition at line 149 of file epsfutils.C.

References FIGNRMWIDTH, font, FontSize, and Width.

Referenced by EpsfTools(), and PIPrintPS().

void EpsfTools::SetPaperTyp int  paper = A4PAPER  )  [inline]
 

Definition at line 50 of file epsfutils.h.

References papertyp.

void EpsfTools::SetPaperTyp int  paper = A4PAPER  )  [inline]
 

Definition at line 50 of file epsfutils.h.

References papertyp.

Referenced by MkIconsPI().

void EpsfTools::tr2picorigin int  Nx,
int  Ny
[private]
 

void EpsfTools::tr2picorigin int  Nx,
int  Ny
[private]
 

Translate PS coordinate system.

Parameters:
int Nx.
int Ny.

Definition at line 248 of file epsfutils.C.

References EpsfBuffer.

Referenced by putbar(), putcircle(), putimgdef(), putline(), and putticks().


Member Data Documentation

char EpsfTools::EpsfBuffer [private]
 

Definition at line 79 of file epsfutils.h.

Referenced by endimage(), FootLine(), init(), placeimage(), putbar(), putcircle(), putframe(), putgrey(), putheader(), putimgdef(), putline(), putticks(), and tr2picorigin().

char* EpsfTools::fname [private]
 

Definition at line 80 of file epsfutils.h.

char* EpsfTools::fname [private]
 

Definition at line 80 of file epsfutils.h.

Referenced by open(), and putheader().

gchar* EpsfTools::font [protected]
 

Definition at line 91 of file epsfutils.h.

gchar* EpsfTools::font [protected]
 

Definition at line 91 of file epsfutils.h.

Referenced by EpsfTools(), putbar(), SPA_epsftools::putmore(), putmore(), SPA_epsftools::putsize(), putsize(), putticks(), SetFontSize(), and ~EpsfTools().

double EpsfTools::FontSize [protected]
 

Definition at line 90 of file epsfutils.h.

Referenced by SetFontSize().

std::ofstream EpsfTools::Icf [protected]
 

Definition at line 89 of file epsfutils.h.

Referenced by close(), endimage(), FootLine(), init(), open(), placeimage(), putcircle(), putframe(), putgrey(), putheader(), putimgdef(), putline(), SPA_epsftools::putmore(), putmore(), SPA_epsftools::putsize(), and putsize().

int EpsfTools::imgdef [private]
 

Definition at line 82 of file epsfutils.h.

Referenced by EpsfTools(), and placeimage().

int EpsfTools::MkTyp [private]
 

Definition at line 81 of file epsfutils.h.

Referenced by NIcons(), and placeimage().

int EpsfTools::nPicPage [private]
 

Definition at line 84 of file epsfutils.h.

Referenced by close(), FootLine(), init(), NIcons(), and placeimage().

int EpsfTools::page [private]
 

Definition at line 85 of file epsfutils.h.

int EpsfTools::papertyp [private]
 

Definition at line 86 of file epsfutils.h.

Referenced by EpsfTools(), placeimage(), putheader(), and SetPaperTyp().

int EpsfTools::PicNo [private]
 

Definition at line 83 of file epsfutils.h.

Referenced by close(), EpsfTools(), FootLine(), init(), and placeimage().

double EpsfTools::Width [protected]
 

Definition at line 90 of file epsfutils.h.

Referenced by placeimage(), SetAbbWidth(), and SetFontSize().


The documentation for this class was generated from the following files:
Generated on Sat Apr 1 09:05:18 2006 for GXSM by  doxygen 1.4.6