home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 5 Edit / 05-Edit.zip / pstoedit.zip / source.zip / pstoedit.2.50 / src / drvgnplt.cpp < prev    next >
C/C++ Source or Header  |  1996-10-29  |  2KB  |  74 lines

  1. /* 
  2.    drvGNUPLOT.cpp : This file is part of pstoedit
  3.    simple backend for GNUplot format.
  4.    Contributed by: Carsten Hammer (chammer@hermes.hrz.uni-bielefeld.de)
  5.  
  6.    Copyright (C) 1993,1994,1995,1996 Wolfgang Glunz, Wolfgang.Glunz@zfe.siemens.de
  7.    (for the skeleton and the rest of pstoedit)
  8.  
  9.     This program is free software; you can redistribute it and/or modify
  10.     it under the terms of the GNU General Public License as published by
  11.     the Free Software Foundation; either version 2 of the License, or
  12.     (at your option) any later version.
  13.  
  14.     This program is distributed in the hope that it will be useful,
  15.     but WITHOUT ANY WARRANTY; without even the implied warranty of
  16.     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  17.     GNU General Public License for more details.
  18.  
  19.     You should have received a copy of the GNU General Public License
  20.     along with this program; if not, write to the Free Software
  21.     Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  22.  
  23. */
  24.  
  25. #include <stdio.h>
  26. #include <string.h>
  27. #include <iostream.h>
  28.  
  29. #include "drvgnplt.h"
  30.  
  31. drvGNUPLOT::drvGNUPLOT(const char * driveroptions_p,ostream & theoutStream,ostream & theerrStream):
  32.     drvbase(driveroptions_p,theoutStream,theerrStream,0,0,0)
  33. {
  34. // driver specific initializations
  35. }
  36.  
  37. drvGNUPLOT::~drvGNUPLOT() {}
  38.  
  39.  
  40. void drvGNUPLOT::print_coords()
  41. {
  42. }
  43.  
  44. void drvGNUPLOT::close_page()
  45. {
  46.     outf << "#Seite beendet.\n";
  47. }
  48.  
  49. void drvGNUPLOT::open_page()
  50. {
  51.     outf << "#Neue Seite\n";
  52. }
  53.  
  54. void drvGNUPLOT::show_text(const TextInfo & textinfo)
  55. {
  56.   unused(&textinfo);
  57. }
  58.  
  59. void drvGNUPLOT::show_path()
  60. {
  61.     outf << "\n#Polyline:\n";
  62.         for (unsigned int n = 0; n < numberOfElementsInPath(); n++) {
  63.         const Point & p = pathElement(n).getPoint(0);
  64.         outf << p.x_ <<"    " << p.y_ << "\n";
  65.     }
  66. };
  67.  
  68. void drvGNUPLOT::show_rectangle(const float llx, const float lly, const float urx, const float ury)
  69. {
  70.  // just do show_polyline for a first guess
  71.       unused(&llx); unused(&lly); unused(&urx); unused(&ury);
  72.     show_path();
  73. }
  74.