Changeset 1534 in Sophya


Ignore:
Timestamp:
Jun 15, 2001, 6:17:08 PM (24 years ago)
Author:
ansari
Message:

Modifs PSPrint pour facteur d'echelle - Pas termine , Reza 15/6/2001

Location:
trunk/SophyaPI/PI
Files:
13 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/pibwdggen.cc

    r1034 r1534  
    288288
    289289/* --Methode-- */
    290 void PIBaseWdgGen::PSPrint(PSFile * psf, int ofx, int ofy)
     290void PIBaseWdgGen::PSPrint(PSFile * psf, int ofx, int ofy, double scale_x, double scale_y)
    291291{
    292292if (!psf) return;
    293 PIGraphicPS grpsf(psf, (PIWdg *)this, ofx, ofy);
     293PIGraphicPS grpsf(psf, (PIWdg *)this, ofx, ofy, scale_x, scale_y);
    294294Draw(&grpsf, 0, 0, XSize(), YSize());
    295295CallDrawers(&grpsf);
  • trunk/SophyaPI/PI/pibwdggen.h

    r1034 r1534  
    7373
    7474// PostScript output
    75   virtual void       PSPrint(PSFile* psf, int ofx = 0, int ofy = 0);
     75  virtual void       PSPrint(PSFile* psf, int ofx = 0, int ofy = 0,
     76                             double scale_x=1., double scale_y=1.);
    7677
    7778// ------ Gestion des Drawers  ------
  • trunk/SophyaPI/PI/picontainergen.cc

    r440 r1534  
    125125
    126126/* --Methode-- */
    127 void PIContainerGen::PSPrint(PSFile *psf, int ofx, int ofy)
     127void PIContainerGen::PSPrint(PSFile *psf, int ofx, int ofy, double scale_x, double scale_y)
    128128{
    129129int i;
    130130if (!psf)  return;
    131131if (!Visible())  return;
    132 for(i=0; i<NbChilds(); i++)  GetChild(i)->PSPrint(psf, ofx+XPos(), ofy+YPos());
     132for(i=0; i<NbChilds(); i++) 
     133  GetChild(i)->PSPrint(psf, ofx+XPos(), ofy+YPos(), scale_x, scale_y);
    133134return;
    134135}
  • trunk/SophyaPI/PI/picontainergen.h

    r329 r1534  
    5151  inline  PILayoutMgr* GetLayoutMgr() { return(layout); }
    5252
    53   virtual void         PSPrint(PSFile *psf, int ofx=0, int ofy=0);
     53  virtual void         PSPrint(PSFile *psf, int ofx=0, int ofy=0,
     54                               double scale_x=1., double scale_y=1.);
    5455
    5556  virtual void         Show();
  • trunk/SophyaPI/PI/pigraphps.cc

    r547 r1534  
    4343
    4444/* --Methode-- */
    45 PIGraphicPS::PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx, double ofy)
     45PIGraphicPS::PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx, double ofy,
     46                         double scale_x, double scale_y)
    4647: PIGraphicGen()
    4748{
    4849BuildFromPSFile(psf, (double)wdg->XPos()+ofx, (double)wdg->YPos()+ofy,
    49                      (double)wdg->XSize(), (double)wdg->YSize() ); 
     50                (double)wdg->XSize(), (double)wdg->YSize(),
     51                (double)wdg->XSize()*scale_x, (double)wdg->YSize()*scale_y ); 
    5052}
    5153
     
    5456: PIGraphicGen()
    5557{
    56 BuildFromPSFile(psf, x0, y0, dx, dy);
     58BuildFromPSFile(psf, x0, y0, dx, dy, dx, dy);
    5759}
    5860
     
    7173
    7274/* --Methode-- */
    73 void PIGraphicPS::BuildFromPSFile(PSFile * psf, double x0, double y0, double dx, double dy)
     75void PIGraphicPS::BuildFromPSFile(PSFile * psf, double x0, double y0, double tx, double ty,
     76                                  double dx, double dy)
    7477{
    7578mPSOut = psf;
     
    8689SelMarker(1, PI_DotMarker);
    8790
    88 if (psf) psf->NewBloc(x0, y0, dx, dy, dx, dy);
     91if (psf) psf->NewBloc(x0, y0, tx, ty, dx, dy);
    8992mXmin = mYmin = 0.;
    9093mXmax = dx;  mYmax = dy;
  • trunk/SophyaPI/PI/pigraphps.h

    r382 r1534  
    99{
    1010public:
    11                      PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx=0., double ofy=0.);
     11                     PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx=0., double ofy=0.,
     12                                 double scale_x=1., double scale_y=1.);
    1213                     PIGraphicPS(PSFile * psf, double x0, double y0, double dx, double dy);
    1314  virtual           ~PIGraphicPS();
     
    7475
    7576protected:
    76   void           BuildFromPSFile(PSFile * psf, double x0, double y0, double dx, double dy);
     77  void           BuildFromPSFile(PSFile * psf, double x0, double y0, double tx, double ty,
     78                                 double dx, double dy);
    7779
    7880  PSFile * mPSOut;  /* Fichier PostScript */
  • trunk/SophyaPI/PI/pistzwin.cc

    r329 r1534  
    172172
    173173/* --Methode-- */
    174 void PIStackWindow::PSPrint(PSFile *psf, int ofx, int ofy)
     174void PIStackWindow::PSPrint(PSFile *psf, int ofx, int ofy, double scale_x, double scale_y)
    175175{
    176176if (!psf) return;
    177177int k;
    178178for(k=0; k<NbChilds(); k++) {
    179   psf->NewPage((double)XSize(), (double)YSize(),PI_Auto);
    180   GetChild(k)->PSPrint(psf, ofx, ofy);
     179  psf->NewPage((double)XSize()*scale_x, (double)YSize()*scale_y,PI_Auto);
     180  GetChild(k)->PSPrint(psf, ofx, ofy, scale_x, scale_y);
    181181  }
    182182}
  • trunk/SophyaPI/PI/pistzwin.h

    r329 r1534  
    4141
    4242  virtual void  SetLayoutMgr(PILayoutMgr* nlay);
    43   virtual void  PSPrint(PSFile *psf, int ofx=0, int ofy=0);
     43  virtual void  PSPrint(PSFile *psf, int ofx=0, int ofy=0,
     44                        double scale_x=1., double scale_y=1.);
    4445
    4546  inline  void  DispNext() { ((PIStackLayout*)layout)->DispNext(); }
  • trunk/SophyaPI/PI/piversion.h

    r1503 r1534  
    22#define PIVERSION_H_SEEN
    33
    4 #define PI_VERSIONNUMBER  2.85
     4#define PI_VERSIONNUMBER  2.90
    55
    66#endif
  • trunk/SophyaPI/PI/piwdggen.cc

    r1034 r1534  
    266266
    267267/* --Methode-- */
    268 void PIWdgGen::PSPrint(PSFile *psf, int ofx, int ofy)
     268void PIWdgGen::PSPrint(PSFile *psf, int ofx, int ofy, double scale_x, double scale_y)
    269269{
    270270char str[256];
    271271
    272272if (!psf) return;
    273 psf->NewBloc((double)ofx+XPos(), (double)ofy+YPos(), (double)XSize(), (double)YSize(),
    274              (double)XSize(), (double)YSize());
    275 psf->DrawBox(0., 0., (double)XSize(), (double)YSize());
     273double dx = (double)XSize()*scale_x;
     274double dy = (double)YSize()*scale_y;
     275psf->NewBloc((double)ofx+XPos(), (double)ofy+YPos(), dx, dy, dx, dy);
     276psf->DrawBox(0., 0., dx, dy);
    276277sprintf(str,"PIWdgGen::PSPrint() Kind=%ld Name= %s", kind(), Nom().c_str());
    277278// N.R. 07/08/99 FontName specifie dans DrawString()
  • trunk/SophyaPI/PI/piwdggen.h

    r1034 r1534  
    100100  virtual bool           IfSensitive()=0;
    101101
    102   virtual void           PSPrint(PSFile *psf, int ofx=0, int ofy=0);
     102  virtual void           PSPrint(PSFile *psf, int ofx=0, int ofy=0,
     103                                 double scale_x=1., double scale_y=1.);
    103104
    104105//  Gestion de copier-coller
  • trunk/SophyaPI/PI/piwindowgen.cc

    r329 r1534  
    7575
    7676/* --Methode-- */
    77 void PIWindowGen::PSPrint(PSFile *psf, int ofx, int ofy)
     77void PIWindowGen::PSPrint(PSFile *psf, int ofx, int ofy, double scale_x, double scale_y)
    7878{
    7979if (!psf) return;
    8080//int ori;
    8181//ori = (XSize() > YSize()) ? LANDSCAPE : PORTRAIT ;
    82 psf->NewPage((float)XSize(), (float)YSize(),PI_Auto);
    83 PIContainerGen::PSPrint(psf, ofx, ofy);
     82psf->NewPage((float)XSize()*scale_x, (float)YSize()*scale_y,PI_Auto);
     83PIContainerGen::PSPrint(psf, ofx, ofy, scale_x, scale_y);
    8484}
    8585
  • trunk/SophyaPI/PI/piwindowgen.h

    r329 r1534  
    2222  virtual long      kind() {return ClassId; }
    2323
    24   virtual void      PSPrint(PSFile *psf, int ofx=0, int ofy=0);
     24  virtual void      PSPrint(PSFile *psf, int ofx=0, int ofy=0,
     25                            double scale_x=1., double scale_y=1.);
    2526
    2627  inline  void      AutoHideOnClose(bool ahc=true) { mAHC = ahc; }
Note: See TracChangeset for help on using the changeset viewer.