1 /* ************************************************************************* 2 gdlpsstream.hpp - graphic stream postscript 3 ------------------- 4 begin : July 22 2002 5 copyright : (C) 2002 by Marc Schellens 6 email : m_schellens@users.sf.net 7 ***************************************************************************/ 8 9 /* ************************************************************************* 10 * * 11 * This program is free software; you can redistribute it and/or modify * 12 * it under the terms of the GNU General Public License as published by * 13 * the Free Software Foundation; either version 2 of the License, or * 14 * (at your option) any later version. * 15 * * 16 ***************************************************************************/ 17 18 #ifndef GDLPSSTREAM_HPP_ 19 #define GDLPSSTREAM_HPP_ 20 21 #include "initsysvar.hpp" 22 #include "gdlgstream.hpp" 23 24 class GDLPSStream: public GDLGStream 25 { 26 private: 27 int page; 28 bool encapsulated; 29 bool portrait; 30 long bitsPerPix; 31 public: GDLPSStream(int nx,int ny,int pfont,bool encaps,int color,int bpp,bool orient_portrait)32 GDLPSStream( int nx, int ny, int pfont, bool encaps, int color, int bpp, bool orient_portrait): 33 #ifdef _MSC_VER 34 GDLGStream( nx, ny, /*pfont == 1 ? "psttf" :*/ (color==0)?"ps":"psc") 35 #else 36 GDLGStream::GDLGStream( nx, ny, /*pfont == 1 ? "psttf" :*/(color==0)?"ps":"psc") 37 #endif 38 { 39 encapsulated = encaps; 40 page = 0; 41 portrait = orient_portrait; 42 bitsPerPix=bpp; 43 } 44 ~GDLPSStream()45 ~GDLPSStream() 46 {} 47 48 void eop(); 49 50 void Init(); 51 bool PaintImage(unsigned char *idata, PLINT nx, PLINT ny, DLong *pos, DLong tru, DLong chan); 52 //logically close the svg each time an update is made, then rollback to the last graphic section for further graphics. Update()53 void Update(){plstream::cmd(PLESC_EXPOSE, NULL);fprintf(pls->OutFile," S\neop\n");fseek(pls->OutFile,-7, SEEK_END);} GetPlplotFudge()54 float GetPlplotFudge(){return 1;}; //correction factor 55 }; 56 57 #endif 58