Index: trunk/SophyaPI/PI/lut.cc
===================================================================
--- trunk/SophyaPI/PI/lut.cc	(revision 203)
+++ trunk/SophyaPI/PI/lut.cc	(revision 204)
@@ -14,5 +14,5 @@
 /* --Methode-- */
 
-LUT::LUT(float min, float max, unsigned short ncol, int typ, int ntable) 
+LUT::LUT(double min, double max, unsigned short ncol, int typ, int ntable) 
 {
 int nlev;
@@ -21,5 +21,5 @@
 nlev = ncol-2;
 if (nlev < 1)  nlev = 1;
-bornes = new float[nlev+1];
+bornes = new double[nlev+1];
 
 if (bornes == NULL)  return;
@@ -40,5 +40,5 @@
 
 /* --Methode-- */
-void LUT::SetLut(float min, float max, int typ)
+void LUT::SetLut(double min, double max, int typ)
 {
 
@@ -49,17 +49,17 @@
   {
   int i;
-  float dx;
+  double dx;
   double dlx;
   switch (typ)
     {
     case kLutType_Lin :
-      dx = (max-min)/(float)nLevel;
+      dx = (max-min)/(double)nLevel;
       for(i=0; i<nLevel; i++)
-        bornes[i] = min+(float)i*dx;
+        bornes[i] = min+(double)i*dx;
       break;
     case kLutType_Log :
-      dlx = log(max-min) / (float)nLevel;
+      dlx = log(max-min) / (double)nLevel;
       for(i=0; i<nLevel; i++)
-        bornes[i] = min+(float)exp((double)i*dlx);
+        bornes[i] = min+(double)exp((double)i*dlx);
       break;
     default:
@@ -87,5 +87,5 @@
 
 /* --Methode-- */
-unsigned short LUT::Apply(float x)
+unsigned short LUT::Apply(double x)
 {
 int i;
@@ -102,5 +102,5 @@
 table = new unsigned short [nt-2];
 tablebinwidth = (Max()-Min())/(nt-2);
-float x = Min()+0.5*tablebinwidth;
+double x = Min()+0.5*tablebinwidth;
 for(int i=0; i<nt-2; i++)  { table[i] = Apply(x); x += tablebinwidth; }
 }
Index: trunk/SophyaPI/PI/lut.h
===================================================================
--- trunk/SophyaPI/PI/lut.h	(revision 203)
+++ trunk/SophyaPI/PI/lut.h	(revision 204)
@@ -19,10 +19,10 @@
 public:
   
-  LUT(float min, float max, unsigned short ncol=16, int typ=kLutType_Lin, int ntable=-1);
+  LUT(double min, double max, unsigned short ncol=16, int typ=kLutType_Lin, int ntable=-1);
   ~LUT();
-  void SetLut(float min, float max, int typ=0);
+  void SetLut(double min, double max, int typ=0);
   void Print();
-  unsigned short Apply(float x);
-  inline unsigned short ApplyFast(float x)
+  unsigned short Apply(double x);
+  inline unsigned short ApplyFast(double x)
     { 
     if (x < Min())  return(0);
@@ -32,6 +32,6 @@
     } 
 
-  inline float Min() { return(bornes[0]); };
-  inline float Max() { return(bornes[nLevel]); };
+  inline double Min() { return(bornes[0]); };
+  inline double Max() { return(bornes[nLevel]); };
   inline int Type() { return(type); };
   inline int NCol() { return(nLevel+2); };
@@ -42,7 +42,7 @@
   int type;
   int nLevel;
-  float * bornes;
+  double * bornes;
   unsigned short * table;
-  float tablebinwidth;
+  double tablebinwidth;
 
 };
Index: trunk/SophyaPI/PI/parradapter.cc
===================================================================
--- trunk/SophyaPI/PI/parradapter.cc	(revision 203)
+++ trunk/SophyaPI/PI/parradapter.cc	(revision 204)
@@ -22,5 +22,5 @@
 
 /* --Methode-- */
-void P1DArrayAdapter::DefineXCoordinate(float x0, float dx)
+void P1DArrayAdapter::DefineXCoordinate(double x0, double dx)
 {
 mOx = x0;  mDx = dx;
@@ -28,5 +28,5 @@
 
 /* --Methode-- */
-float P1DArrayAdapter::X(int i)
+double P1DArrayAdapter::X(int i)
 {
 return(mOx+mDx*i);
@@ -60,5 +60,5 @@
 
 /* --Methode-- */
-void P2DArrayAdapter::DefineXYCoordinates(float x0, float y0, float dx, float dy)
+void P2DArrayAdapter::DefineXYCoordinates(double x0, double y0, double dx, double dy)
 {
 mOx = x0;   mOy = y0;
@@ -67,5 +67,5 @@
 
 /* --Methode-- */
-void P2DArrayAdapter::XYfromxy(int ix, int iy, float& x, float& y)
+void P2DArrayAdapter::XYfromxy(int ix, int iy, double& x, double& y)
 {
 x = mOx+ix*mDx;
@@ -74,5 +74,5 @@
 
 /* --Methode-- */
-int P2DArrayAdapter::CheckDyn(float& min, float& max, float& moy, float& sig, int& nbnul, int& nbsat, int vit)
+int P2DArrayAdapter::CheckDyn(double& min, double& max, double& moy, double& sig, int& nbnul, int& nbsat, int vit)
 {
 // TIMEF ; 
@@ -85,7 +85,7 @@
 
 if (min >= max) { min = -9.e19; max = 9.e19; }
-float minpix = max;
-float maxpix = min; 
-float pixv;
+double minpix = max;
+double maxpix = min; 
+double pixv;
 // printf("DEBUG_CHECKDYN-IN %d - %g %g ", vit, min, max);
 
@@ -130,5 +130,5 @@
 
 /* --Methode-- */
-void P2DArrayAdapter::ComputeLut_PicHisto(float& min, float& max, int nbsig, float fracmax)
+void P2DArrayAdapter::ComputeLut_PicHisto(double& min, double& max, int nbsig, double fracmax)
 {
 // TIMEF ; 
@@ -143,17 +143,20 @@
 
 //  Variable decrivant l'histogramme 
-float minhis, maxhis, binwidth;
+double minhis, maxhis, binwidth;
 int under,over,tothis;
 int *phis;
 int *q;
 
-float MINDYNAMIC = 1.e-5;          /* Gamme dynamique minimale (MaxAff-MinAff)*/
-float FRACPIC =	0.6065;            /*  Valeur de exp(-0.5)   */
-
-
-int nbnul, nbsat, nok;
-float moy, sig;
-if ( min >= (max-MINDYNAMIC) ) nok = CheckDyn(min, max, moy, sig, nbnul, nbsat);
-if (nok < 1) { min=0.; max = 1.; return; }
+double MINDYNAMIC = 1.e-8;          /* Gamme dynamique minimale (MaxAff-MinAff)*/
+double FRACPIC = 0.6065;            /*  Valeur de exp(-0.5)   */
+
+
+
+if ( min >= (max-MINDYNAMIC) ) { 
+  int nbnul, nbsat, nok;
+  double moy, sig; 
+  nok = CheckDyn(min, max, moy, sig, nbnul, nbsat, vitesse);
+  if (nok < 1) { min=0.; max = 1.;  return; }
+  }
 if ( min >= (max-MINDYNAMIC) )  max = min+MINDYNAMIC;
 minhis = min;
@@ -164,4 +167,5 @@
   maxhis = nbin*binwidth + minhis;
   }
+// printf("DEBUG nbin minhis maxhis binwidth = %d %g %g %g \n", nbin, minhis, maxhis, binwidth);
 
 /* allocation dynamique de memoire et mise a zero de l'histogramme */
@@ -202,5 +206,5 @@
 
 /*   On va chercher le sigma du fond  SigmaLeft, SigmaRight */
-int hmin = (int) ( (float)(hmax) * FRACPIC ) ;
+int hmin = (int) ( (double)(hmax) * FRACPIC ) ;
 
 int sigr = 0;
@@ -215,7 +219,7 @@
 if (nbsig < 0)  {  /*   On considere le cas ou NbSigmas est negatif   */
   if ( (bin = binmax+nbsig*sigl) < 0 )  bin = 0;
-  min = minhis + (float)bin*binwidth;
+  min = minhis + (double)bin*binwidth;
   if ( (bin = binmax-nbsig*sigr) >= nbin ) bin = nbin-1;
-  max = minhis + (float)bin*binwidth;
+  max = minhis + (double)bin*binwidth;
   if (max < (min+MINDYNAMIC))  max = min+MINDYNAMIC;
   delete[] phis;  return; 
@@ -235,5 +239,5 @@
 int nbpix = 0;
 for( q = phis+bin ; q < phis+nbin ; q++)  nbpix += (*q);
-nbpix = (int_4)((float)nbpix * fracmax);
+nbpix = (int_4)((double)nbpix * fracmax);
 int nbpix2 = 0; q = phis+bin; 
 int k = bin;
@@ -241,5 +245,5 @@
   { nbpix2 += (*q); k++; q++; }
 
-max = minhis + (float)k*binwidth;
+max = minhis + (double)k*binwidth;
 delete[] phis;
 if (max < (min+MINDYNAMIC))  max = min+MINDYNAMIC;
@@ -258,5 +262,5 @@
 int npx, npy, nppx, nppy, nszp, oszp;
 int i,j,k,l;
-float vpx;
+double vpx;
 
 
@@ -310,5 +314,5 @@
     }
   else if (zm < -1) {       // Compression 
-    float fv = (float)(zmm*zmm); 
+    double fv = (double)(zmm*zmm); 
     for(j=ofy; j<ofy+npy; j+=zmm)
       for(i=ofx; i<ofx+npx; i+=zmm) {
@@ -341,5 +345,5 @@
     }
   else if (zm < -1) {       // Compression 
-    float fv = (float)(zmm*zmm); 
+    double fv = (double)(zmm*zmm); 
     for(j=ofy; j<ofy+npy; j+=zmm)
       for(i=ofx; i<ofx+npx; i+=zmm) {
Index: trunk/SophyaPI/PI/parradapter.h
===================================================================
--- trunk/SophyaPI/PI/parradapter.h	(revision 203)
+++ trunk/SophyaPI/PI/parradapter.h	(revision 204)
@@ -16,12 +16,12 @@
   virtual         ~P1DArrayAdapter();
  
-  virtual float   Value(int i) = 0;
+  virtual double  Value(int i) = 0;
   inline  int     Size() { return (mSize) ; }
-  virtual void    DefineXCoordinate(float x0, float dx);
-  virtual float   X(int i);
+  virtual void    DefineXCoordinate(double x0, double dx);
+  virtual double  X(int i);
      
 protected :
   int mSize;
-  float mOx, mDx;
+  double mOx, mDx;
 };
 
@@ -41,20 +41,20 @@
                                { invx = invX; invy = invY; exy = eXY; }
 
-  virtual void    DefineXYCoordinates(float x0, float y0, float dx, float dy);
+  virtual void    DefineXYCoordinates(double x0, double y0, double dx, double dy);
 // Doit etre defini par les classes derivees
-  virtual float   Value(int ix, int iy) = 0;   
+  virtual double  Value(int ix, int iy) = 0;   
 
-  virtual void    XYfromxy(int ix, int iy, float& x, float& y);
+  virtual void    XYfromxy(int ix, int iy, double& x, double& y);
 
   inline  int     XSize() { return ( eXY ? sY : sX ) ; }
   inline  int     YSize() { return ( eXY ? sX : sY ) ; }
 
-  inline  void    XYCoord(int i, int j, float& x, float& y)
+  inline  void    XYCoord(int i, int j, double& x, double& y)
                          { int ix, iy;  IJ2xy(i, j, ix, iy); 
                            XYfromxy(ix, iy, x, y); }
-  inline  void    Coord(int i, int j, float& x, float& y)
-                       { int ix, iy;  float f; IJ2xy(i, j, ix, iy); 
+  inline  void    Coord(int i, int j, double& x, double& y)
+                       { int ix, iy;  double f; IJ2xy(i, j, ix, iy); 
                        XYfromxy(ix, iy, x, y); if (eXY) {f=x; x=y; y=f; } }
-  inline  float   operator() (int i, int j) 
+  inline  double  operator() (int i, int j) 
                          { int ix, iy;  IJ2xy(i, j, ix, iy); 
                          return Value(ix, iy); }
@@ -65,7 +65,7 @@
 
 //    Calcul Min-Max, Moy-Sig
-  virtual int     CheckDyn(float& min, float& max, float& moy, float& sig, int& nbnul, int& nbsat, int vit=10);
+  virtual int     CheckDyn(double& min, double& max, double& moy, double& sig, int& nbnul, int& nbsat, int vit=10);
 //    Calcul AutoLut
-  virtual void    ComputeLut_PicHisto(float& min, float& max, int nbsig=1, float fracmax=0.95);
+  virtual void    ComputeLut_PicHisto(double& min, double& max, int nbsig=1, double fracmax=0.95);
 
 //    Calcul pixmap avec un LUT
@@ -75,5 +75,5 @@
 protected :
   int sX, sY;
-  float mOx, mDx, mOy, mDy;
+  double mOx, mDx, mOy, mDy;
   int sgnX, sgnY;
   int offX, offY;
@@ -89,5 +89,5 @@
 
   virtual 	  ~P1DAdapter() { if ( (aDel) && (mData != NULL) ) delete[] mData; }
-  virtual float   Value(int i) 
+  virtual double  Value(int i) 
                     {  if ( (i < 0) || (i >= mSize) ) return(0.); 
                     return(mData[i]); }
@@ -106,5 +106,5 @@
 
   virtual 	  ~P2DAdapter() { if ( (aDel) && (mData != NULL) ) delete[] mData; }
-  virtual float   Value(int ix, int iy) 
+  virtual double   Value(int ix, int iy) 
                     {  if ( (ix < 0)  || (iy < 0) || (ix >= sX) || (iy >= sY) ) return(0.); 
                     return(mData[ix+iy*sX]); }
Index: trunk/SophyaPI/PI/pi3ddrw.cc
===================================================================
--- trunk/SophyaPI/PI/pi3ddrw.cc	(revision 203)
+++ trunk/SophyaPI/PI/pi3ddrw.cc	(revision 204)
@@ -38,16 +38,16 @@
 // PIDrawer3D()
 //	Cosntructeur
-// void Set3DView_Obs(float xo, float yo, float zo, float teta, float phi, float psi, -
-//               float dax, float day, float co, float dco=0.2)
+// void Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, -
+//               double dax, double day, double co, double dco=0.2)
 //	Définition de la vue 3D. Voir "PIGraphic3D::Set3DCS_Obs(...)"
-// void Set3DView(float xc, float yc, float zc, float xo, float yo, float zo, -
-//                float dax, float day, float dco=0.2, float psi=0.)
+// void Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, -
+//                double dax, double day, double dco=0.2, double psi=0.)
 //	Définition de la vue 3D. Voir "PIGraphic3D::Set3DCS(...)"
-// bool Get3DView(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo, -
-//                float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco)
+// bool Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, -
+//                double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco)
 //	Renvoie la définition de la Vue-3D. Retourne "true " si définie par "Set3DView_Obs()"
-// void Draw3DBoxe(PIGraphic3D* g3, float xx1, float xx2, float yy1, float yy2,  -
-//                 float zz1, float zz2, float xl1, float xl2, -
-//                 float yl1, float yl2, float zl1, float zl2)
+// void Draw3DBoxe(PIGraphic3D* g3, double xx1, double xx2, double yy1, double yy2,  -
+//                 double zz1, double zz2, double xl1, double xl2, -
+//                 double yl1, double yl2, double zl1, double zl2)
 //	Trace une boîte avec les coordonnées matérialisant la vue 3D.
 //--
@@ -73,6 +73,6 @@
 
 /* --Methode-- */
-void PIDrawer3D::Set3DView_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 
-                               float dax, float day, float co, float dco)
+void PIDrawer3D::Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                               double dax, double day, double co, double dco)
 {
   tO = teta;  fO = phi;  pO = psi;
@@ -83,6 +83,6 @@
 
 /* --Methode-- */
-void PIDrawer3D::Set3DView(float xc, float yc, float zc, float xo, float yo, float zo, 
-                           float dax, float day, float dco, float psi)
+void PIDrawer3D::Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
+                           double dax, double day, double dco, double psi)
 {
   xC = xc;  yC = yc;  zC = zc;
@@ -95,6 +95,6 @@
 
 /* --Methode-- */
-bool PIDrawer3D::Get3DView(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo,
-                           float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco)
+bool PIDrawer3D::Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo,
+                           double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco)
 {
   xo = xO;  yo = yO;  zo = zO;
@@ -136,7 +136,7 @@
 /* --Methode-- */
 void PIDrawer3D::Draw3DBoxe(PIGraphic3D* g3, 
-                            float xx1, float xx2, float yy1, float yy2, 
-                            float zz1, float zz2, float xl1, float xl2, 
-                            float yl1, float yl2, float zl1, float zl2)
+                            double xx1, double xx2, double yy1, double yy2, 
+                            double zz1, double zz2, double xl1, double xl2, 
+                            double yl1, double yl2, double zl1, double zl2)
 {
   if (mLAtt == PI_NotDefLineAtt)    g3->SelLine(PI_ThinLine);
@@ -161,5 +161,5 @@
   x1 = x2 = xx1;   y1 = y2 = yy1;  z1 = z2 = zz1;
   for (k=0; k<NTicks; k++) {
-    x1 = x2 = (xx1+(float)k*(xx2-xx1)/(NTicks-1.));
+    x1 = x2 = (xx1+(double)k*(xx2-xx1)/(NTicks-1.));
     z1 = zz1; z2 = zz1-0.02*(zz2-zz1);
     y1 = y2 = yy1;
@@ -167,5 +167,5 @@
     z2 = zz1-0.05*(zz2-zz1); 
     y2 = yy1-0.075*(yy2-yy1);  
-    sprintf(strg,"%.2g", xl1+(float)k*(xl2-xl1)/(NTicks-1.));
+    sprintf(strg,"%.2g", xl1+(double)k*(xl2-xl1)/(NTicks-1.));
     g3->DrawString3D(x2, y2, z2, strg);
     }
@@ -184,5 +184,5 @@
   x1 = x2 = xx2;   y1 = y2 = yy1;  z1 = z2 = zz1;
   for (k=1; k<NTicks; k++) {   // Attention, par le tick 0 pour Y
-    y1 = y2 = (yy1+(float)k*(yy2-yy1)/(NTicks-1.));
+    y1 = y2 = (yy1+(double)k*(yy2-yy1)/(NTicks-1.));
     z2 = zz1-0.02*(zz2-zz1);
     x1 = x2 = xx2; 
@@ -190,5 +190,5 @@
     z2 = zz1-0.05*(zz2-zz1); 
     x2 = xx2+0.075*(xx2-xx1);  
-    sprintf(strg,"%.2g", yl1+(float)k*(yl2-yl1)/(NTicks-1.));
+    sprintf(strg,"%.2g", yl1+(double)k*(yl2-yl1)/(NTicks-1.));
     g3->DrawString3D(x2, y2, z2, strg);
     }
@@ -207,5 +207,5 @@
   x1 = x2 = xx1;   y1 = y2 = yy1;  z1 = z2 = zz1;
   for (k=0; k<NTicks; k++) {
-    z1 = z2 = (zz1+(float)k*(zz2-zz1)/(NTicks-1.));
+    z1 = z2 = (zz1+(double)k*(zz2-zz1)/(NTicks-1.));
     y2 = yy1-0.015*(yy2-yy1);
     x2 = xx1-0.015*(xx2-xx1);
@@ -213,5 +213,5 @@
     x2 = xx1-0.1*(xx2-xx1);  
     y2 = yy1-0.1*(yy2-yy1);  
-    sprintf(strg,"%.2g", zl1+(float)k*(zl2-zl1)/(NTicks-1.));
+    sprintf(strg,"%.2g", zl1+(double)k*(zl2-zl1)/(NTicks-1.));
     g3->DrawString3D(x2, y2, z2, strg);
     }
@@ -311,6 +311,6 @@
 
 /* --Methode-- */
-void PIDraw3DWdg::Set3DView_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 
-                                float dax, float day, float co, float dco)
+void PIDraw3DWdg::Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                                double dax, double day, double co, double dco)
 {
   mGr3d->Set3DCS_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
@@ -326,6 +326,6 @@
 
 /* --Methode-- */
-void PIDraw3DWdg::Set3DView(float xc, float yc, float zc, float xo, float yo, float zo, 
-                            float dax, float day, float dco, float psi)
+void PIDraw3DWdg::Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
+                            double dax, double day, double dco, double psi)
 {
   mGr3d->Set3DCS(xc, yc, zc, xo, yo, zo, dax, day, dco, psi);
@@ -341,6 +341,6 @@
 
 /* --Methode-- */
-bool PIDraw3DWdg::Get3DView(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo, 
-                            float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco)
+bool PIDraw3DWdg::Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, 
+                            double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco)
 {
   return(mGr3d->Get3DCS(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco));
@@ -360,5 +360,5 @@
   if (dr3 == NULL)  return;
   dr3->UpdateLimits();
-  float xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
+  double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
   bool vobs;
   vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
@@ -372,7 +372,7 @@
 void PIDraw3DWdg::SetDrawers3DView()
 {
-  float xc, yc, zc, xo, yo, zo;
-  float teta, phi, psi;
-  float dax, day, co, dco;
+  double xc, yc, zc, xo, yo, zo;
+  double teta, phi, psi;
+  double dax, day, co, dco;
   bool vo;
   vo = mGr3d->Get3DCS( xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
@@ -398,5 +398,5 @@
 if (!vfixed)  { 
   dr3->UpdateLimits();
-  float xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
+  double xo, yo, zo, xc, yc, zc, teta, phi, psi, dax, day, co, dco;
   bool vobs;
   vobs = dr3->Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
@@ -405,5 +405,5 @@
   }
 else { 
-  float xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco;
+  double xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco;
   if ( Get3DView(xc, yc, zc, xo, yo, zo, teta, phi, psi, dax, day, co, dco) ) 
       dr3->Set3DView_Obs(xo, yo, zo, teta, phi, psi, dax, day, co, dco);
@@ -468,6 +468,6 @@
 strncpy(pc, (char*)pdata, ll-1);  pc[ll-1] = '\0';
 // printf("PIDraw3DWdg::PasteSelection() / Debug  %s - %d %d -> %g %g \n", pc, 
-//        mPx, mPy, (float)mPx/(float)XSize(), 1.-(float)mPy/(float)YSize());
-mBDrw->ElAddText((float)mPx/(float)XSize(), 1.-(float)mPy/(float)YSize(), pc );
+//        mPx, mPy, (double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize());
+mBDrw->ElAddText((double)mPx/(double)XSize(), 1.-(double)mPy/(double)YSize(), pc );
 mBDrw->Refresh();
 }
@@ -477,7 +477,7 @@
 {
   mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());
-  float xo, yo, zo;
-  float teta, phi, psi;
-  float dax, day, co, dco;
+  double xo, yo, zo;
+  double teta, phi, psi;
+  double dax, day, co, dco;
   mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
 //   puts("\n PIDraw3DWdg::But2Press() ");
@@ -525,14 +525,14 @@
 {
   DrawXYZAxes();
-  float teta, phi;
+  double teta, phi;
 
   if (rOfg) { 
-    phi = cPhi + (M_PI*0.25*(float)(x-lPx)/XSize());
-    teta = cTeta - (M_PI*0.25*(float)(y-lPy)/YSize());
+    phi = cPhi + (M_PI*0.25*(double)(x-lPx)/XSize());
+    teta = cTeta - (M_PI*0.25*(double)(y-lPy)/YSize());
     mGr3d->RotateObject(teta, phi, false);
     }
   else {
-    phi = cPhi - (M_PI*0.5*(float)(x-lPx)/XSize());
-    teta = cTeta + (M_PI*0.5*(float)(y-lPy)/YSize());
+    phi = cPhi - (M_PI*0.5*(double)(x-lPx)/XSize());
+    teta = cTeta + (M_PI*0.5*(double)(y-lPy)/YSize());
     mGr3d->RotateObserver(teta, phi, 0., false);
     }
@@ -569,7 +569,7 @@
 void PIDraw3DWdg::But3Press(int x, int y)
 {
-  float xo, yo, zo;
-  float teta, phi, psi;
-  float dax, day, co, dco;
+  double xo, yo, zo;
+  double teta, phi, psi;
+  double dax, day, co, dco;
   mGr3d->Get3DCS(cXc, cYc, cZc, xo, yo, zo, teta, phi, psi, dax, day, co, dco);
   mGr3d->SetBaseGraphic(mWGrC, 0, 0, XSize(), YSize());
@@ -597,10 +597,10 @@
 {
   DrawXYZAxes();
-  float rapx = (float)(lPx-x)/XSize();
+  double rapx = (double)(lPx-x)/XSize();
   if (rapx > 0.) rapx = rapx*2.+1;
   else rapx += 1.;
   if (rapx < 0.3)  rapx = 0.3;
   if (rapx > 3.)  rapx = 3.;
-  float rapy = (float)(y-lPy)/YSize();
+  double rapy = (double)(y-lPy)/YSize();
   if (rapy > 0.) rapy = rapy*2.+1;
   else rapy += 1.;
@@ -649,5 +649,5 @@
 //   mGr3d->DrawCircle(0., 0., daxO*0.30);
   char buff[256];
-  float xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
+  double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
   mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);
   sprintf(buff, " C: %g %g %g -> O: %g %g %g  (T/P0= %g %g)     ", xc,yc,zc, xo, yo, zo, cTeta, cPhi);
@@ -676,6 +676,6 @@
 y -= YSize()/2;
 
-float fx = (float)x/XSize(); 
-float fy = (float)y/YSize(); 
+double fx = (double)x/XSize(); 
+double fy = (double)y/YSize(); 
 if ( (fx<0.2) && (fx>-0.2) && (fy<0.2) && (fy>-0.2) ) {
   
@@ -694,5 +694,5 @@
   isw++;
   mGr3d->PrintCS();
-  float xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
+  double xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco;
   mGr3d->Get3DCS(xc,yc,zc,xo,yo,zo,teta,phi,psi,dax,day,co,dco);
   mGr3d->Set3DCS(xc,yc,zc,xo,yo,zo,dax,day,dco,psi);
Index: trunk/SophyaPI/PI/pi3ddrw.h
===================================================================
--- trunk/SophyaPI/PI/pi3ddrw.h	(revision 203)
+++ trunk/SophyaPI/PI/pi3ddrw.h	(revision 204)
@@ -22,35 +22,35 @@
   virtual		~PIDrawer3D();
 
-  virtual void		Set3DView_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 
-                                      float dax, float day, float co, float dco=0.2);
-  virtual void       	Set3DView(float xc, float yc, float zc, float xo, float yo, float zo, 
-                                  float dax, float day, float dco=0.2, float psi=0.);
-  bool           	Get3DView(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo,
-                                  float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco);
+  virtual void		Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                                      double dax, double day, double co, double dco=0.2);
+  virtual void       	Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
+                                  double dax, double day, double dco=0.2, double psi=0.);
+  bool           	Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo,
+                                  double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco);
   
   virtual PIGraphicUC*	SetDrwWdg(PIBaseWdgGen* drw, int x0, int y0, int dx, int dy, PIGraphicGen* g);
 
   virtual void       	DrawAxes(PIGraphicUC* g);
-  virtual void       	Draw3DBoxe(PIGraphic3D* g3, float xx1, float xx2, float yy1, float yy2, 
-                                                    float zz1, float zz2, float xl1, float xl2, 
-                                                    float yl1, float yl2, float zl1, float zl2);
+  virtual void       	Draw3DBoxe(PIGraphic3D* g3, double xx1, double xx2, double yy1, double yy2, 
+                                                    double zz1, double zz2, double xl1, double xl2, 
+                                                    double yl1, double yl2, double zl1, double zl2);
 
-  float XMin3() const {return x3Min;}
-  float XMax3() const {return x3Max;}
-  float YMin3() const {return y3Min;}
-  float YMax3() const {return y3Max;}
-  float ZMin3() const {return z3Min;}
-  float ZMax3() const {return z3Max;}
+  double XMin3() const {return x3Min;}
+  double XMax3() const {return x3Max;}
+  double YMin3() const {return y3Min;}
+  double YMax3() const {return y3Max;}
+  double ZMin3() const {return z3Min;}
+  double ZMax3() const {return z3Max;}
 
 protected :
-  float xO, yO, zO;  // Position observateur = camera
-  float xC, yC, zC;  // Position centre du champ
-  float tO,fO,pO;    // Orientation observateur (Teta, Phi, Psi, Angles d Euler)
-  float daxO, dayO;  // Demi-ouverture de la camera suivant les deux axes de projection (xp/zp, yp/zp) 
-  float lCO, dlCO;   // Distance Camera-Centre du champ et profondeur de champ 
+  double xO, yO, zO;  // Position observateur = camera
+  double xC, yC, zC;  // Position centre du champ
+  double tO,fO,pO;    // Orientation observateur (Teta, Phi, Psi, Angles d Euler)
+  double daxO, dayO;  // Demi-ouverture de la camera suivant les deux axes de projection (xp/zp, yp/zp) 
+  double lCO, dlCO;   // Distance Camera-Centre du champ et profondeur de champ 
   bool v3D_obs;      // Si defini par Set3DView_Obs 
-  float x3Min, x3Max;  // Pour delimiter le cube 3D 
-  float y3Min, y3Max;  // Pour delimiter le cube 3D 
-  float z3Min, z3Max;  // Pour delimiter le cube 3D 
+  double x3Min, x3Max;  // Pour delimiter le cube 3D 
+  double y3Min, y3Max;  // Pour delimiter le cube 3D 
+  double z3Min, z3Max;  // Pour delimiter le cube 3D 
 };
 
@@ -68,10 +68,10 @@
 
 
-  virtual void		Set3DView_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 
-                                      float dax, float day, float co, float dco=0.2);
-  virtual void       	Set3DView(float xc, float yc, float zc, float xo, float yo, float zo, 
-                                  float dax, float day, float dco=0.2, float psi=0.);
-  bool           	Get3DView(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo, 
-                                  float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco);
+  virtual void		Set3DView_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                                      double dax, double day, double co, double dco=0.2);
+  virtual void       	Set3DView(double xc, double yc, double zc, double xo, double yo, double zo, 
+                                  double dax, double day, double dco=0.2, double psi=0.);
+  bool           	Get3DView(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, 
+                                  double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco);
 
   virtual void          Update3DView();   // Vue 3-D a partir de Drawer No 1
@@ -114,7 +114,7 @@
   int lPx, lPy;         // dernier position pointeur
   PIColors lCol;        // Couleur
-  float cTeta, cPhi, cUlen;    // Pour garder valeurs avant rotation, Unite de longeur
-  float cXc, cYc, cZc;         // Pour garder position du centre de champ 
-  float clCO, cDax, cDay;      // Pour garder les valeurs avant Zoom In/Out
+  double cTeta, cPhi, cUlen;    // Pour garder valeurs avant rotation, Unite de longeur
+  double cXc, cYc, cZc;         // Pour garder position du centre de champ 
+  double clCO, cDax, cDay;      // Pour garder les valeurs avant Zoom In/Out
   bool  rOfg;                  // si Vrai  on fait tourner l'objet et pas la camera
   bool  axfg;                  // si Vrai on trace les axes
Index: trunk/SophyaPI/PI/pibwdggen.cc
===================================================================
--- trunk/SophyaPI/PI/pibwdggen.cc	(revision 203)
+++ trunk/SophyaPI/PI/pibwdggen.cc	(revision 204)
@@ -10,5 +10,5 @@
 #include "pidrwtools.h"
 
-static inline void fl_swap(float& a, float& b) { float tmp = a; a = b; b = tmp;  } 
+static inline void dbl_swap(double& a, double& b) { double tmp = a; a = b; b = tmp;  } 
 
 //++
@@ -314,5 +314,5 @@
 //	si "psz=true", les coordonnées sont supposées être des facteurs multiplicatifs 
 //	des dimensions de l'objet.
-// void  SetDefaultDrawerLimits(float xmin, float xmax, float ymin, float ymax, -
+// void  SetDefaultDrawerLimits(double xmin, double xmax, double ymin, double ymax, -
 //                              int axrl=kAxeDirSame, int ayud=kAxeDirSame)
 //	Définition du système de coordonnées par défaut d'un drawer attaché en "autolim=true"
@@ -328,5 +328,5 @@
 
 /* --Methode-- */
-void PIBaseWdgGen::SetDefaultDrawerLimits(float xmin, float xmax, float ymin, float ymax,
+void PIBaseWdgGen::SetDefaultDrawerLimits(double xmin, double xmax, double ymin, double ymax,
                                           int axrl, int ayud)
 {
@@ -483,5 +483,5 @@
 void PIBaseWdgGen::CallDrawers(PIGraphic* g, int x0, int y0, int dx, int dy)
 {
-float xmin,ymin, xmax, ymax;
+double xmin,ymin, xmax, ymax;
 PIGraphicUC* guc;
 int drx0, dry0, drdx, drdy;
@@ -489,8 +489,8 @@
 
 if (mDrElastic) { 
-  ddrx0 = (int)((float) mDrX1 * (float)XSize());
-  ddry0 = (int)((float) mDrY1 * (float)YSize());
-  ddrdx = (int)((float) mDrX2 * (float)XSize()) - ddrx0 ;
-  ddrdy = (int)((float) mDrY2 * (float)YSize()) - ddry0 ;
+  ddrx0 = (int)((double) mDrX1 * (double)XSize());
+  ddry0 = (int)((double) mDrY1 * (double)YSize());
+  ddrdx = (int)((double) mDrX2 * (double)XSize()) - ddrx0 ;
+  ddrdy = (int)((double) mDrY2 * (double)YSize()) - ddry0 ;
   }
 else {
@@ -510,8 +510,8 @@
   else {
     if ( (*it).elastic  ) {   // Taille/position defin en fraction de la taille du PIBaseWdg
-      drx0 = (int)((float)(*it).x1 * (float)XSize());
-      dry0 = (int)((float)(*it).y1 * (float)YSize());
-      drdx = (int)((float)(*it).x2 * (float)XSize()) - drx0 ;
-      drdy = (int)((float)(*it).y2 * (float)YSize()) - dry0 ;
+      drx0 = (int)((double)(*it).x1 * (double)XSize());
+      dry0 = (int)((double)(*it).y1 * (double)YSize());
+      drdx = (int)((double)(*it).x2 * (double)XSize()) - drx0 ;
+      drdy = (int)((double)(*it).y2 * (double)YSize()) - dry0 ;
       }
     else {
@@ -534,6 +534,6 @@
     guc->GrC2UC(XSize(), YSize(), xmax, ymax);    
     } 
-  if (xmin > xmax)  fl_swap(xmin,xmax);
-  if (ymin > ymax)  fl_swap(ymin,ymax);
+  if (xmin > xmax)  dbl_swap(xmin,xmax);
+  if (ymin > ymax)  dbl_swap(ymin,ymax);
   (*it).drw->Draw(guc, xmin, ymin, xmax, ymax);
   g->RestoreGraphicAtt();
@@ -547,5 +547,5 @@
 void PIBaseWdgGen::CallDrawer(int id)
 {
-float xmin,ymin, xmax, ymax;
+double xmin,ymin, xmax, ymax;
 PIGraphicUC* guc;
 int drx0, dry0, drdx, drdy;
@@ -555,8 +555,8 @@
 
 if (mDrElastic) { 
-  ddrx0 = (int)((float) mDrX1 * (float)XSize());
-  ddry0 = (int)((float) mDrY1 * (float)YSize());
-  ddrdx = (int)((float) mDrX2 * (float)XSize()) - ddrx0 ;
-  ddrdy = (int)((float) mDrY2 * (float)YSize()) - ddry0 ;
+  ddrx0 = (int)((double) mDrX1 * (double)XSize());
+  ddry0 = (int)((double) mDrY1 * (double)YSize());
+  ddrdx = (int)((double) mDrX2 * (double)XSize()) - ddrx0 ;
+  ddrdy = (int)((double) mDrY2 * (double)YSize()) - ddry0 ;
   }
 else {
@@ -572,8 +572,8 @@
     else {
       if ( (*it).elastic  ) {   // Taille/position defin en fraction de la taille du PIBaseWdg
-        drx0 = (int)((float)(*it).x1 * (float)XSize());
-        dry0 = (int)((float)(*it).y1 * (float)YSize());
-        drdx = (int)((float)(*it).x2 * (float)XSize()) - drx0 ;
-        drdy = (int)((float)(*it).y2 * (float)YSize()) - dry0 ;
+        drx0 = (int)((double)(*it).x1 * (double)XSize());
+        dry0 = (int)((double)(*it).y1 * (double)YSize());
+        drdx = (int)((double)(*it).x2 * (double)XSize()) - drx0 ;
+        drdy = (int)((double)(*it).y2 * (double)YSize()) - dry0 ;
         }
       else {
@@ -590,6 +590,6 @@
     guc->GrC2UC(0, 0, xmin, ymin);
     guc->GrC2UC(XSize(), YSize(), xmax, ymax);     
-    if (xmin > xmax)  fl_swap(xmin,xmax);
-    if (ymin > ymax)  fl_swap(ymin,ymax);
+    if (xmin > xmax)  dbl_swap(xmin,xmax);
+    if (ymin > ymax)  dbl_swap(ymin,ymax);
     (*it).drw->Draw(guc, xmin, ymin, xmax, ymax);
     g->RestoreGraphicAtt();    
Index: trunk/SophyaPI/PI/pibwdggen.h
===================================================================
--- trunk/SophyaPI/PI/pibwdggen.h	(revision 203)
+++ trunk/SophyaPI/PI/pibwdggen.h	(revision 204)
@@ -85,5 +85,5 @@
   virtual void       SetDefaultDrawRectangle(PIGrCoord x1, PIGrCoord y1, 
                                              PIGrCoord x2, PIGrCoord y2, bool psz=true); 
-  virtual void       SetDefaultDrawerLimits(float xmin, float xmax, float ymin, float ymax,
+  virtual void       SetDefaultDrawerLimits(double xmin, double xmax, double ymin, double ymax,
                                             int axrl=kAxeDirSame, int ayud=kAxeDirSame); 
   virtual int        AddDrawer(PIDrawer* drw, PIGrCoord x1, PIGrCoord y1, 
@@ -118,5 +118,5 @@
   PIGrCoord mDrX1, mDrY1,  mDrX2,  mDrY2;  
   bool mDrElastic;   // true --> Coord en fraction de la taille 
-  float mDrXmin, mDrXmax, mDrYmin, mDrYmax;   // Limites par defaut - UC
+  double mDrXmin, mDrXmax, mDrYmin, mDrYmax;   // Limites par defaut - UC
   int  mDXdir, mDYdir;                        // Sens des axes par defaut
 
Index: trunk/SophyaPI/PI/pidrawer.cc
===================================================================
--- trunk/SophyaPI/PI/pidrawer.cc	(revision 203)
+++ trunk/SophyaPI/PI/pidrawer.cc	(revision 204)
@@ -59,5 +59,5 @@
 
 //++
-// void  SetLimits(float xmin, float xmax, float ymin, float ymax, -
+// void  SetLimits(double xmin, double xmax, double ymin, double ymax, -
 //                 int axrl=kAxeDirSame, int ayud=kAxeDirSame)
 //	Définit les limites du système de coordonnées.
@@ -71,14 +71,14 @@
 
 void
-PIDrawer::SetLimits(float xmin, float xmax, float ymin, float ymax,
+PIDrawer::SetLimits(double xmin, double xmax, double ymin, double ymax,
                     int axrl, int ayud)
 {
   if (axrl == kAxeDirAuto) {
-    float ff;
+    double ff;
     if (xmax < xmin)  { axrl = kAxeDirRtoL;   ff=xmin;  xmin=xmax;  xmax=ff; }
     else  axrl = kAxeDirLtoR;
   }
   if (ayud == kAxeDirAuto) {
-    float ff;
+    double ff;
     if (ymax < ymin)  { ayud = kAxeDirUpDown;   ff=ymin;  ymin=ymax;  ymax=ff; }
     else  ayud = kAxeDirDownUp;
@@ -100,5 +100,5 @@
 
 //++
-//  void  Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax)
+//  void  Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax)
 //	Méthode qui est appelé lorsquer l'objet PIDrawer doit rafraichir la zone
 //	définie par "xmin-xmax" , "ymin-ymax" dans le système de coordonnées du
@@ -227,5 +227,5 @@
 
 /* --Methode-Static-- */
-void PIDrawer::BestTicks(float rmin,float rmax,int nticks,float& majt)
+void PIDrawer::BestTicks(double rmin,double rmax,int nticks,double& majt)
 {
 double d = rmax - rmin;
@@ -336,12 +336,12 @@
     // Longueur des ticks
     
-    float extXMajTickLen = flags&kExtTicks ? xMajTickLen : 0;
-    float intXMajTickLen = flags&kIntTicks ? xMajTickLen : 0;
-    float extXMinTickLen = flags&kExtTicks ? xMinTickLen : 0;
-    float intXMinTickLen = flags&kIntTicks ? xMinTickLen : 0;
-    float extYMajTickLen = flags&kExtTicks ? yMajTickLen : 0;
-    float intYMajTickLen = flags&kIntTicks ? yMajTickLen : 0;
-    float extYMinTickLen = flags&kExtTicks ? yMinTickLen : 0;
-    float intYMinTickLen = flags&kIntTicks ? yMinTickLen : 0;
+    double extXMajTickLen = flags&kExtTicks ? xMajTickLen : 0;
+    double intXMajTickLen = flags&kIntTicks ? xMajTickLen : 0;
+    double extXMinTickLen = flags&kExtTicks ? xMinTickLen : 0;
+    double intXMinTickLen = flags&kIntTicks ? xMinTickLen : 0;
+    double extYMajTickLen = flags&kExtTicks ? yMajTickLen : 0;
+    double intYMajTickLen = flags&kIntTicks ? yMajTickLen : 0;
+    double extYMinTickLen = flags&kExtTicks ? yMinTickLen : 0;
+    double intYMinTickLen = flags&kIntTicks ? yMinTickLen : 0;
 
     // La grille en pointilles
@@ -395,34 +395,34 @@
 
 void
-PIDrawer::Draw(PIGraphicUC* g, float /*xmin*/, float /*ymin*/, float /*xmax*/, float /*ymax*/)
-{
-}
-
-
-void
-PIDrawer::DrawHTicks(PIGraphicUC* g, float y, float tickUp, float tickDown, float xBeg, float xStep)
-{
-  for (float x=xBeg; x<=xMax; x += xStep)
+PIDrawer::Draw(PIGraphicUC* g, double /*xmin*/, double /*ymin*/, double /*xmax*/, double /*ymax*/)
+{
+}
+
+
+void
+PIDrawer::DrawHTicks(PIGraphicUC* g, double y, double tickUp, double tickDown, double xBeg, double xStep)
+{
+  for (double x=xBeg; x<=xMax; x += xStep)
     g->DrawLine(x, y-tickDown, x, y+tickUp);
 }
 
 void
-PIDrawer::DrawVTicks(PIGraphicUC* g, float x, float tickLeft, float tickRight, float yBeg, float yStep)
-{
-  for (float y=yBeg; y<=yMax; y += yStep)
+PIDrawer::DrawVTicks(PIGraphicUC* g, double x, double tickLeft, double tickRight, double yBeg, double yStep)
+{
+  for (double y=yBeg; y<=yMax; y += yStep)
     g->DrawLine(x-tickLeft, y, x+tickRight, y);
 }
 
 void
-PIDrawer::DrawHLabels(PIGraphicUC* g, float y, float xBeg, float xStep, int just)
-{
-  float xOffset = 0;
+PIDrawer::DrawHLabels(PIGraphicUC* g, double y, double xBeg, double xStep, int just)
+{
+  double xOffset = 0;
   int kk;
   g->SelFontSz(xMajTickLen*4.);
-  for (float x=xBeg; x<=xMax; x += xStep) {
+  for (double x=xBeg; x<=xMax; x += xStep) {
       char label[20]; sprintf(label, "%-6g", x);
       for(kk=0; kk<20; kk++)
         if (label[kk] == ' ')   { label[kk] = '\0' ; break; }
-      float largeur = g->CalcStringWidth(label);
+      double largeur = g->CalcStringWidth(label);
       if (just == 1)
         xOffset = -largeur;
@@ -437,11 +437,11 @@
 
 void
-PIDrawer::DrawVLabels(PIGraphicUC* g, float x, float yBeg, float yStep, int just)
-{
-  float xOffset = 0;
+PIDrawer::DrawVLabels(PIGraphicUC* g, double x, double yBeg, double yStep, int just)
+{
+  double xOffset = 0;
   g->SelFontSz(xMajTickLen*4.);
-  for (float y=yBeg; y<=yMax; y += yStep) {
+  for (double y=yBeg; y<=yMax; y += yStep) {
       char label[20]; sprintf(label, "%-6g", y);
-      float largeur = g->CalcStringWidth(label);
+      double largeur = g->CalcStringWidth(label);
       if (just == 1)
         xOffset = -largeur;
@@ -461,8 +461,8 @@
   g->SelLine(PI_ThinDashedLine);
 
-  for (float x=xFirstMajTick; x<=xMax; x += xMajTickStep)
+  for (double x=xFirstMajTick; x<=xMax; x += xMajTickStep)
     g->DrawLine(x, yMin, x, yMax);
 
-  for (float y=yFirstMajTick; y<=yMax; y += yMajTickStep)
+  for (double y=yFirstMajTick; y<=yMax; y += yMajTickStep)
     g->DrawLine(xMin, y, xMax, y);
 
@@ -501,5 +501,5 @@
 
 /* --Methode-- */
-void  PIElDrawer::Draw(PIGraphicUC* g, float /*xmin*/, float /*ymin*/, float /*xmax*/, float /*ymax*/)
+void  PIElDrawer::Draw(PIGraphicUC* g, double /*xmin*/, double /*ymin*/, double /*xmax*/, double /*ymax*/)
 {
 DrawAxes(g);   // Trace des axes 
@@ -512,5 +512,5 @@
   aYdir = false;  // Vrai si Axe Y de Haut vers Bas
   PIGrCoord gas, gds;
-  float fx, fy, fh;
+  double fx, fy, fh;
 //  fh = g->GetFontHeightUC(gas, gds);
   fh = 0.075*(YMax()-YMin());
Index: trunk/SophyaPI/PI/pidrawer.h
===================================================================
--- trunk/SophyaPI/PI/pidrawer.h	(revision 203)
+++ trunk/SophyaPI/PI/pidrawer.h	(revision 204)
@@ -34,5 +34,5 @@
   virtual           ~PIDrawer();
 
-  virtual void       SetLimits(float xmin, float xmax, float ymin, float ymax,
+  virtual void       SetLimits(double xmin, double xmax, double ymin, double ymax,
                                int axrl=kAxeDirSame, int ayud=kAxeDirSame);
 
@@ -40,13 +40,13 @@
   virtual void       SetAxesFlags(unsigned int flags=kAxesNone);
     
-  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax); 
+  virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 
    
   virtual void       Refresh();      // Recalcule les limites et reaffiche
   virtual void       UpdateLimits();   // Calcule et change les limites  
 
-  float XMin() const {return xMin;}
-  float XMax() const {return xMax;}
-  float YMin() const {return yMin;}
-  float YMax() const {return yMax;}
+  double XMin() const {return xMin;}
+  double XMax() const {return xMax;}
+  double YMin() const {return yMin;}
+  double YMax() const {return yMax;}
   inline unsigned int GetAxesFlags() { return(axesFlags); }
   
@@ -68,5 +68,5 @@
 //  --- Methode static ----
 //  Calcul des Distances optimales des subdivisions 
-  static void        BestTicks(float rmin,float rmax,int nticks,float& majt);
+  static void        BestTicks(double rmin,double rmax,int nticks,double& majt);
 
 //  Les objets/methodes suivants devraient etre protected     
@@ -84,22 +84,22 @@
   void CalcTicks();
 
-  void DrawHTicks(PIGraphicUC* g, float y, float tickUp, float tickDown, float xBeg, float xStep);
-  void DrawVTicks(PIGraphicUC* g, float x, float tickLeft, float tickRight, float yBeg, float yStep);
-  void DrawHLabels(PIGraphicUC* g, float y, float xBeg, float xStep, int just=0);
-  void DrawVLabels(PIGraphicUC* g, float x, float yBeg, float yStep, int just=0);
+  void DrawHTicks(PIGraphicUC* g, double y, double tickUp, double tickDown, double xBeg, double xStep);
+  void DrawVTicks(PIGraphicUC* g, double x, double tickLeft, double tickRight, double yBeg, double yStep);
+  void DrawHLabels(PIGraphicUC* g, double y, double xBeg, double xStep, int just=0);
+  void DrawVLabels(PIGraphicUC* g, double x, double yBeg, double yStep, int just=0);
   void DrawGrid(PIGraphicUC* g);
 
   
-  float xMin, xMax, yMin, yMax;  // Valeurs en unites user
+  double xMin, xMax, yMin, yMax;  // Valeurs en unites user
   int xW0, yW0, xWd, yWd;        // Origine/largeur ds la fenetre de trace
   bool   aXdir, aYdir;           // Sens des axes horiz, vertical 
   int aXFlg, aYFlg;
 
-  float xFirstMajTick, xFirstMinTick;
-  float yFirstMajTick, yFirstMinTick;
-  float xMajTickStep, xMinTickStep;
-  float yMajTickStep, yMinTickStep;
-  float xMajTickLen,  xMinTickLen;
-  float yMajTickLen,  yMinTickLen;
+  double xFirstMajTick, xFirstMinTick;
+  double yFirstMajTick, yFirstMinTick;
+  double xMajTickStep, xMinTickStep;
+  double yMajTickStep, yMinTickStep;
+  double xMajTickLen,  xMinTickLen;
+  double yMajTickLen,  yMinTickLen;
   
   int limitsFixed;
@@ -139,5 +139,5 @@
   virtual void       SetTitles(string const & tt, string const & tb);
 
-  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax); 
+  virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 
 
   inline int         ElAddLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2, 
Index: trunk/SophyaPI/PI/pidrwtools.cc
===================================================================
--- trunk/SophyaPI/PI/pidrwtools.cc	(revision 203)
+++ trunk/SophyaPI/PI/pidrwtools.cc	(revision 204)
@@ -332,5 +332,5 @@
 
 char strg[64];
-float xmin, xmax, ymin, ymax;
+double xmin, xmax, ymin, ymax;
 int axrl = kAxeDirLtoR;
 int ayud = kAxeDirDownUp;
@@ -340,6 +340,6 @@
 
   case 2600 :
-    sscanf(mText[0]->GetText().c_str(), "%g %g" , &xmin, &xmax);
-    sscanf(mText[1]->GetText().c_str(), "%g %g" , &ymin, &ymax);
+    sscanf(mText[0]->GetText().c_str(), "%lg %lg" , &xmin, &xmax);
+    sscanf(mText[1]->GetText().c_str(), "%lg %lg" , &ymin, &ymax);
     if (mCkb[0]->GetState())  axrl = kAxeDirRtoL ;
     if (mCkb[1]->GetState())  ayud = kAxeDirUpDown;
Index: trunk/SophyaPI/PI/pigraph3d.cc
===================================================================
--- trunk/SophyaPI/PI/pigraph3d.cc	(revision 203)
+++ trunk/SophyaPI/PI/pigraph3d.cc	(revision 204)
@@ -75,6 +75,6 @@
 
 //++
-// void  Set3DCS_Obs(float xo, float yo, float zo, float teta, float phi, float psi, -
-//                  float dax, float day, float co, float dco=0.2)
+// void  Set3DCS_Obs(double xo, double yo, double zo, double teta, double phi, double psi, -
+//                  double dax, double day, double co, double dco=0.2)
 //	Définition du système de projection 3D à l'aide de la position de l'observateur 
 //	et de la direction de visée.
@@ -86,6 +86,6 @@
 //|	dco : profondeur de champ 
 //
-// void  Set3DCS(float xc, float yc, float zc, float xo, float yo, float zo, -
-//               float dax, float day, float dco=0.2, float psi=0.)
+// void  Set3DCS(double xc, double yc, double zc, double xo, double yo, double zo, -
+//               double dax, double day, double dco=0.2, double psi=0.)
 //	Définition du système de projection 3D à partir de la position de l'observateur et 
 //	du centre du champ.
@@ -106,10 +106,9 @@
 #endif
 
-static float deuxpi = 2*M_PI;
-static double ddeuxpi = 2*M_PI;
-
-/* --Methode-- */
-void PIGraphic3D::Set3DCS_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 
-                              float dax, float day, float co, float dco)
+static double deuxpi = 2*M_PI;
+
+/* --Methode-- */
+void PIGraphic3D::Set3DCS_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                              double dax, double day, double co, double dco)
 {
   sO = true;
@@ -149,6 +148,6 @@
 
 /* --Methode-- */
-void PIGraphic3D::Set3DCS(float xc, float yc, float zc, float xo, float yo, float zo, 
-                          float dax, float day, float dco, float psi)
+void PIGraphic3D::Set3DCS(double xc, double yc, double zc, double xo, double yo, double zo, 
+                          double dax, double day, double dco, double psi)
 {
   sO = false;
@@ -185,5 +184,5 @@
   tO = acos(ct);
   if (lxy < 1.e-6) { fO = 0.;  cf = 0.;  }
-  else {  cf = dx/lxy;  fO = acos(cf);  if (dy < 0.)  fO = ddeuxpi-fO;   }
+  else {  cf = dx/lxy;  fO = acos(cf);  if (dy < 0.)  fO = deuxpi-fO;   }
 // (Teta,Phi) = Direction de visee 
 // Les angles d'Euler correspondants sont Teta, Phi+Pi/2
@@ -201,20 +200,20 @@
 
 //++
-// bool Get3DCS(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo, -
-//             float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco);
+// bool Get3DCS(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, -
+//             double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco);
 //	Renvoie les paramètres de définition du système de projection 3D.
 //	"Rc= true" si défini par  "Set3DCS_Obs()"
 //	
-// void  RotateObserver(float teta, float phi, float psi=0., bool rel=true)
+// void  RotateObserver(double teta, double phi, double psi=0., bool rel=true)
 //	Positionne l'observateur (la caméra) en maintenant la position  
 //	du centre de champ fixe. Si "rel=false" : "teta, phi" determine la nouvelle
 //	direction de visée. Si "rel=false" : la direction de visée est tournée
 //	de l'angle "teta,phi". 
-// void  RotateObject(float teta, float phi, bool rel=true)
+// void  RotateObject(double teta, double phi, bool rel=true)
 //	Repostionne le centre du champ en maintenant la position de l'observateur fixe.
 //	Si "rel=false" : "teta, phi" determine la nouvelle direction de visée.
 //	Si "rel=false" : la direction de visée est tournée de l'angle "teta,phi". 
 // 
-// void  ZoomInOut(float fco, float fdax, float fday, bool rel=true)
+// void  ZoomInOut(double fco, double fdax, double fday, bool rel=true)
 //	Eloigne ou approche l'observateur et modifie l'ouverture du plan image.
 //	si "real=true" : "fco, fdax, fday" sont des facteurs multiplicatifs
@@ -225,6 +224,6 @@
 
 /* --Methode-- */
-bool PIGraphic3D::Get3DCS(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo, 
-                          float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco)
+bool PIGraphic3D::Get3DCS(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo, 
+                          double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco)
 {
   xc = xC;  yc = yC;  zc = zC;
@@ -238,5 +237,5 @@
 
 /* --Methode-- */
-void PIGraphic3D::RotateObserver(float teta, float phi, float psi, bool rel)
+void PIGraphic3D::RotateObserver(double teta, double phi, double psi, bool rel)
 // Positionne l'observateur (la camera) de maniere a ce que la direction de 
 // visee soit tO=teta, pO=phi (rel=false) / tO+=teta pO+=phi (rel=true) 
@@ -251,5 +250,5 @@
   while (teta > deuxpi)  teta -= deuxpi;
   if (teta > M_PI)  { teta = M_PI-teta;  phi = phi+M_PI; }
-  float xo,yo,zo; 
+  double xo,yo,zo; 
   zo = -cos((double)teta)*lCO+zC;
   xo = -sin((double)teta)*cos((double)phi)*lCO+xC;
@@ -259,5 +258,5 @@
 
 /* --Methode-- */
-void PIGraphic3D::RotateObject(float teta, float phi, bool rel)
+void PIGraphic3D::RotateObject(double teta, double phi, bool rel)
 // Positionne l'objet (centre du champ) de maniere a ce que la direction de 
 // visee soit tO=teta, pO=phi (rel=false) / tO+=teta pO+=phi (rel=true) 
@@ -271,5 +270,5 @@
   while (teta > deuxpi)  teta -= deuxpi;
   if (teta > M_PI)  { teta = M_PI-teta;  phi = phi+M_PI; }
-  float xc,yc,zc; 
+  double xc,yc,zc; 
   zc = cos((double)teta)*lCO+zO;
   xc = sin((double)teta)*cos((double)phi)*lCO+xO;
@@ -279,5 +278,5 @@
 
 /* --Methode-- */
-void PIGraphic3D::ZoomInOut(float fco, float fdax, float fday, bool rel)
+void PIGraphic3D::ZoomInOut(double fco, double fdax, double fday, bool rel)
 {
   if (fco < 0.001) fco = 1.;
@@ -291,5 +290,5 @@
   }
   else dl = fco; 
-  float xo,yo,zo; 
+  double xo,yo,zo; 
   if (dl < 1.e-5) dl = 1.e-5;
   zo = zC-cos((double)tO)*dl;
@@ -301,5 +300,5 @@
 
 /* --Methode-- */
-void PIGraphic3D::C3DC2ObsCS(float x, float y, float z, float& xp, float& yp, float& zp)
+void PIGraphic3D::C3DC2ObsCS(double x, double y, double z, double& xp, double& yp, double& zp)
 {
   double xc, yc, zc;
@@ -311,8 +310,8 @@
 
 /* --Methode-- */
-void PIGraphic3D::Proj3DC2GrC(float x, float y, float z, float& xpix, float& ypix)
+void PIGraphic3D::Proj3DC2GrC(double x, double y, double z, double& xpix, double& ypix)
 {
   double xc, yc, zc;
-  float xp, yp, zp;
+  double xp, yp, zp;
   xc = x-xO;   yc = y-yO;    zc = z-zO;
   xp = RE[0][0]*xc+RE[0][1]*yc+RE[0][2]*zc;   
@@ -321,6 +320,6 @@
   if ((zp>-1.e-6) && (zp < 1.e-6))   // Protection Divide/0
     { xpix = ypix = 0.;   return; }
-  xpix = (float)(xOrg + (xp/zp)*xScale);
-  ypix = (float)(yOrg + (yp/zp)*yScale);
+  xpix = (double)(xOrg + (xp/zp)*xScale);
+  ypix = (double)(yOrg + (yp/zp)*yScale);
 //  printf("-DBG-Proj3DC2GrC() %g %g %g -> %g %g %g -> %g %g %g -> (%g %g)\n", x,y,z,xc,yc,zc,xp,yp,zp,xp/zp,yp/zp);
 //  printf("-DBG- ... (%g %g %g - %g %g) %g %g - %g %g -> %g %g \n", xO,yO,zO, tO,fO, xOrg, yOrg,xScale,yScale ,xpix,ypix);
@@ -353,5 +352,5 @@
 {
   if (!mGrC) return;
-  float xf, yf;
+  double xf, yf;
   Proj3DC2GrC(x0, y0, z0, xf, yf);
   mGrC->DrawString(xf, yf, s);
@@ -363,5 +362,5 @@
 {
   if (!mGrC) return;
-  float xf, yf;
+  double xf, yf;
   Proj3DC2GrC(x0, y0, z0, xf, yf);
   mGrC->DrawOpaqueString(xf, yf, s);
@@ -374,10 +373,10 @@
 {
   if (!mGrC) return;
-  float xf1, yf1, xf2, yf2;
+  double xf1, yf1, xf2, yf2;
   Proj3DC2GrC(x1, y1, z1, xf1, yf1);
   Proj3DC2GrC(x2, y2, z2, xf2, yf2);
 //  printf("-DBG-DrawLine3D() : %g %g %g -> %g %g | %g %g %g -> %g %g\n", 
-//         (float)x1, (float)y1, (float)z1, xf1, yf1, 
-//         (float)x2, (float)y2, (float)z2, xf2, yf2 );
+//         (double)x1, (double)y1, (double)z1, xf1, yf1, 
+//         (double)x2, (double)y2, (double)z2, xf2, yf2 );
   mGrC->DrawLine(xf1, yf1, xf2, yf2);
 }
@@ -391,5 +390,5 @@
   PIGrCoord *pxc, *pyc;
   int i;
-  float xf, yf;
+  double xf, yf;
  
   if (!mGrC) return;
@@ -414,5 +413,5 @@
   PIGrCoord *pxc, *pyc;
   int i;
-  float xf, yf;
+  double xf, yf;
  
   if (!mGrC) return;
@@ -434,5 +433,5 @@
 {
   if (!mGrC) return;
-  float xf, yf;
+  double xf, yf;
   Proj3DC2GrC(x0, y0, z0, xf, yf);
   mGrC->DrawMarker(xf, yf);
@@ -446,5 +445,5 @@
   PIGrCoord *pxc, *pyc;
   int i;
-  float xf, yf;
+  double xf, yf;
  
   if (!mGrC) return;
@@ -473,5 +472,5 @@
 printf("RE[3][3]=  %g %g %g | %g %g %g | %g %g %g\n", 
         RE[0][0], RE[0][1], RE[0][2], RE[1][0], RE[1][1], RE[1][2], RE[2][0], RE[2][1], RE[2][2]); 
-float x,y,z,xp,yp,zp, xpix, ypix;
+double x,y,z,xp,yp,zp, xpix, ypix;
 x = xC, y = yC, z= zC;
 C3DC2ObsCS(x, y, z, xp, yp, zp);
Index: trunk/SophyaPI/PI/pigraph3d.h
===================================================================
--- trunk/SophyaPI/PI/pigraph3d.h	(revision 203)
+++ trunk/SophyaPI/PI/pigraph3d.h	(revision 204)
@@ -20,18 +20,18 @@
 
 //  Definition du systeme de projection 3D-2D
-  virtual void       Set3DCS_Obs(float xo, float yo, float zo, float teta, float phi, float psi, 
-                                 float dax, float day, float co, float dco=0.2);
-  virtual void       Set3DCS(float xc, float yc, float zc, float xo, float yo, float zo, 
-                             float dax, float day, float dco=0.2, float psi=0.);
-  virtual bool       Get3DCS(float& xc, float& yc, float& zc, float& xo, float& yo, float& zo,  
-                             float& teta, float& phi, float& psi, float& dax, float& day, float& co, float& dco);
+  virtual void       Set3DCS_Obs(double xo, double yo, double zo, double teta, double phi, double psi, 
+                                 double dax, double day, double co, double dco=0.2);
+  virtual void       Set3DCS(double xc, double yc, double zc, double xo, double yo, double zo, 
+                             double dax, double day, double dco=0.2, double psi=0.);
+  virtual bool       Get3DCS(double& xc, double& yc, double& zc, double& xo, double& yo, double& zo,  
+                             double& teta, double& phi, double& psi, double& dax, double& day, double& co, double& dco);
 
   virtual void       PrintCS();  // Pour debugger
-  virtual void       RotateObserver(float teta, float phi, float psi=0., bool rel=true);
-  virtual void       RotateObject(float teta, float phi, bool rel=true);
-  virtual void       ZoomInOut(float fco, float fdax, float fday, bool rel=true);
+  virtual void       RotateObserver(double teta, double phi, double psi=0., bool rel=true);
+  virtual void       RotateObject(double teta, double phi, bool rel=true);
+  virtual void       ZoomInOut(double fco, double fdax, double fday, bool rel=true);
 
-  virtual void       C3DC2ObsCS(float x, float y, float z, float& xp, float& yp, float& zp);
-  virtual void       Proj3DC2GrC(float x, float y, float z, float& xpix, float& ypix);
+  virtual void       C3DC2ObsCS(double x, double y, double z, double& xp, double& yp, double& zp);
+  virtual void       Proj3DC2GrC(double x, double y, double z, double& xpix, double& ypix);
   
   virtual void       DrawString3D(PIGrCoord x0, PIGrCoord y0, PIGrCoord z0, const char* s);
Index: trunk/SophyaPI/PI/pigraphgen.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphgen.cc	(revision 203)
+++ trunk/SophyaPI/PI/pigraphgen.cc	(revision 204)
@@ -145,8 +145,8 @@
 // void  DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc=true)
 //	Tracé d'un polygone plein de la couleur d'avant-plan.
-// void  DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, float degdeb, float degfin)
+// void  DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, double degdeb, double degfin)
 //	Tracé d'un arc de cercle ou d'ellipse, inclu dans le "(x0,y0)" , "dx,dy" 
 //	entre les angles (en degré) "degdeb" - "degfin" 
-// void  DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, float degdeb, float degfin)
+// void  DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, double degdeb, double degfin)
 //	Tracé d'un arc plein, inclu dans le "(x0,y0)" , "dx,dy" 
 //	entre les angles (en degré) "degdeb" - "degfin" 
@@ -338,4 +338,6 @@
 // operator float() 
 //	Conversion en réél "float"
+// operator double() 
+//	Conversion en réél "double"
 //--
 //++
Index: trunk/SophyaPI/PI/pigraphgen.h
===================================================================
--- trunk/SophyaPI/PI/pigraphgen.h	(revision 203)
+++ trunk/SophyaPI/PI/pigraphgen.h	(revision 204)
@@ -43,21 +43,22 @@
 
 
-//  Classe pour gerer indifferement des coordonnees float ou int 
+//  Classe pour gerer indifferement des coordonnees double ou int 
 class PIGrCoord {
 public:
-  inline PIGrCoord() { iv = 0; fv = 0.;}
-  inline PIGrCoord(int a) { iv = a; fv = (float)a;}
-  inline PIGrCoord(float a) { iv = (int)a; fv = a;}
-  inline PIGrCoord(double a) { iv = (int)a; fv = (float)a;}
+  inline PIGrCoord() { iv = 0; dv = 0.;}
+  inline PIGrCoord(int a) { iv = a; dv = (double)a;}
+  inline PIGrCoord(float a) { iv = (int)a; dv = (double)a;}
+  inline PIGrCoord(double a) { iv = (int)a; dv = a;}
   inline operator int() { return(iv); }
   inline operator short() { return((short)iv); }
   inline operator unsigned int() { return((unsigned int)iv); }
   inline operator unsigned short() { return((unsigned short)iv); }
-  inline operator float() { return(fv); }
-  inline PIGrCoord& operator= (int a) { iv = a; fv = (float)a; return(*this); }
-  inline PIGrCoord& operator= (float a) { iv = (int)a; fv = a; return(*this); }
-  inline PIGrCoord& operator= (double a) { iv = (int)a; fv = (float)a; return(*this); }
+  inline operator float() { return((float)dv); }
+  inline operator double() { return(dv); }
+  inline PIGrCoord& operator= (int a) { iv = a; dv = (double)a; return(*this); }
+  inline PIGrCoord& operator= (float a) { iv = (int)a; dv = (double)a; return(*this); }
+  inline PIGrCoord& operator= (double a) { iv = (int)a; dv = a; return(*this); }
   int iv;
-  float fv;
+  double dv;
 };
 
@@ -96,7 +97,7 @@
   virtual void       DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc=true)   = 0;  
   virtual void       DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
-                             float degdeb, float degfin)                               = 0;
+                             double degdeb, double degfin)                             = 0;
   virtual void       DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                              float degdeb, float degfin)                              = 0;
+                              double degdeb, double degfin)                            = 0;
   virtual void       DrawMarker(PIGrCoord x0, PIGrCoord y0)                            = 0;
   virtual void       DrawMarkers(PIGrCoord *x, PIGrCoord *y, int n)                    = 0;
Index: trunk/SophyaPI/PI/pigraphps.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphps.cc	(revision 203)
+++ trunk/SophyaPI/PI/pigraphps.cc	(revision 204)
@@ -29,9 +29,9 @@
 //--
 //++
-// PIGraphicPS(PSFile * psf, float x0, float y0, float dx, float dy)
+// PIGraphicPS(PSFile * psf, double x0, double y0, double dx, double dy)
 //	Création d'un objet "PIGraphicPS" à partir d'un objet "PSFIle* psf".
 //	"(x0, y0)" détermine l'origine du nouveau bloc rectangulaire sur 
 //	la page et "dx, dy" l'extension du bloc. 
-// PIGraphicPS(PSFile * psf, PIWdg* wdg, float ofx, float ofy)
+// PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx, double ofy)
 //	Création d'un objet "PIGraphicPS" à partir d'un objet "PSFIle* psf"
 //|	x0 = wdg->XPos()+ofx    y0 = wdg->YPos()+ofy
@@ -43,13 +43,13 @@
 
 /* --Methode-- */
-PIGraphicPS::PIGraphicPS(PSFile * psf, PIWdg* wdg, float ofx, float ofy)
+PIGraphicPS::PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx, double ofy)
 : PIGraphicGen()
 {
-BuildFromPSFile(psf, (float)wdg->XPos()+ofx, (float)wdg->YPos()+ofy, 
-                     (float)wdg->XSize(), (float)wdg->YSize() );  
-}
-
-/* --Methode-- */
-PIGraphicPS::PIGraphicPS(PSFile * psf, float x0, float y0, float dx, float dy)
+BuildFromPSFile(psf, (double)wdg->XPos()+ofx, (double)wdg->YPos()+ofy, 
+                     (double)wdg->XSize(), (double)wdg->YSize() );  
+}
+
+/* --Methode-- */
+PIGraphicPS::PIGraphicPS(PSFile * psf, double x0, double y0, double dx, double dy)
 : PIGraphicGen()
 {
@@ -71,5 +71,5 @@
 
 /* --Methode-- */
-void PIGraphicPS::BuildFromPSFile(PSFile * psf, float x0, float y0, float dx, float dy)
+void PIGraphicPS::BuildFromPSFile(PSFile * psf, double x0, double y0, double dx, double dy)
 {
 mPSOut = psf;
@@ -111,5 +111,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawString((float)x,(float)y,s,mFCol,mFAtt,mFSize); /* $CHECK$ PIFontSize ?? */
+  mPSOut->DrawString((double)x,(double)y,s,mFCol,mFAtt,mFSize); /* $CHECK$ PIFontSize ?? */
 return;
 }
@@ -119,5 +119,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawString((float)x,(float)y,s,mFCol,mFAtt,mFSize); /* $CHECK$ PIFontSize ?? */
+  mPSOut->DrawString((double)x,(double)y,s,mFCol,mFAtt,mFSize); /* $CHECK$ PIFontSize ?? */
 return;
 }
@@ -128,5 +128,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawLine((float)x1,(float)y1,(float)x2,(float)y2,mFCol,mLAtt);
+  mPSOut->DrawLine((double)x1,(double)y1,(double)x2,(double)y2,mFCol,mLAtt);
 return;
 }
@@ -137,5 +137,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawBox((float)x0,(float)y0,(float)dx,(float)dy,mFCol,mLAtt);
+  mPSOut->DrawBox((double)x0,(double)y0,(double)dx,(double)dy,mFCol,mLAtt);
 return;
 }
@@ -145,5 +145,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawFBox((float)x0,(float)y0,(float)dx,(float)dy, mFCol, mFCol, mLAtt);
+  mPSOut->DrawFBox((double)x0,(double)y0,(double)dx,(double)dy, mFCol, mFCol, mLAtt);
 return;
 }
@@ -153,5 +153,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawCircle((float)x0,(float)y0,(float)r,mFCol,mLAtt);
+  mPSOut->DrawCircle((double)x0,(double)y0,(double)r,mFCol,mLAtt);
 return;
 }
@@ -161,5 +161,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawFCircle((float)x0,(float)y0,(float)r,mFCol,mFCol,mLAtt);
+  mPSOut->DrawFCircle((double)x0,(double)y0,(double)r,mFCol,mFCol,mLAtt);
 return;
 }
@@ -181,20 +181,20 @@
 {
 int i;
-float *xtmp;
-float *ytmp;
+double *xtmp;
+double *ytmp;
 
 if(! mPSOut) return;
 
-xtmp = new float[n];
-ytmp = new float[n];
-for(i = 0 ; i < n ; i++) {xtmp[i] = (float)x[i] ; ytmp[i] = (float)y[i] ; }
-//float xoff,yoff;
+xtmp = new double[n];
+ytmp = new double[n];
+for(i = 0 ; i < n ; i++) {xtmp[i] = (double)x[i] ; ytmp[i] = (double)y[i] ; }
+//double xoff,yoff;
 //if (cinc) { xoff=yoff=0.; }   // Coord en mode incremental
-//else { xoff = (float)x[0];  yoff = (float)y[0]; }   //   Coord en mode absolu
-//xtmp[0] = (float)x[0];
-//ytmp[0] = (float)y[0];
+//else { xoff = (double)x[0];  yoff = (double)y[0]; }   //   Coord en mode absolu
+//xtmp[0] = (double)x[0];
+//ytmp[0] = (double)y[0];
 //for(i=1;i<n;i++) {
-//  xtmp[i] = (float)x[i]-xoff;
-//  ytmp[i] = (float)y[i]-yoff;
+//  xtmp[i] = (double)x[i]-xoff;
+//  ytmp[i] = (double)y[i]-yoff;
 //}
 mPSOut->DrawPolygon(xtmp,ytmp,n,mFCol,mLAtt,cinc);
@@ -210,20 +210,20 @@
 {
 int i;
-float *xtmp;
-float *ytmp;
+double *xtmp;
+double *ytmp;
 
 if(! mPSOut) return;
 
-xtmp = new float[n];
-ytmp = new float[n];
-for(i = 0 ; i < n ; i++) {xtmp[i] = (float)x[i] ; ytmp[i] = (float)y[i] ; }
-//float xoff,yoff;
+xtmp = new double[n];
+ytmp = new double[n];
+for(i = 0 ; i < n ; i++) {xtmp[i] = (double)x[i] ; ytmp[i] = (double)y[i] ; }
+//double xoff,yoff;
 //if (cinc) { xoff=yoff=0.; }   // Coord en mode incremental
-//else { xoff = (float)x[0];  yoff = (float)y[0]; }   //   Coord en mode absolu
-//xtmp[0] = (float)x[0];
-//ytmp[0] = (float)y[0];
+//else { xoff = (double)x[0];  yoff = (double)y[0]; }   //   Coord en mode absolu
+//xtmp[0] = (double)x[0];
+//ytmp[0] = (double)y[0];
 //for(i=1;i<n;i++) {
-//  xtmp[i] = (float)x[i]-xoff;
-//  ytmp[i] = (float)y[i]-yoff;
+//  xtmp[i] = (double)x[i]-xoff;
+//  ytmp[i] = (double)y[i]-yoff;
 //}
 mPSOut->DrawFPolygon(xtmp,ytmp,n,mFCol,mFCol,mLAtt,cinc);
@@ -235,5 +235,5 @@
 
 /* --Methode-- */
-void PIGraphicPS::DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,float degdeb, float degfin)
+void PIGraphicPS::DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,double degdeb, double degfin)
 {
 // $CHECK$ Reza/ Nicolas  12 Nov 98 - A faire
@@ -241,5 +241,5 @@
 
 /* --Methode-- */
-void PIGraphicPS::DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,float degdeb, float degfin)
+void PIGraphicPS::DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,double degdeb, double degfin)
 {
 // $CHECK$ Reza/ Nicolas  12 Nov 98 - A faire
@@ -250,5 +250,5 @@
 {
 if(mPSOut)
-  mPSOut->DrawMarker((float)x0,(float)y0,mMrk,mFCol,mMrkSz);
+  mPSOut->DrawMarker((double)x0,(double)y0,mMrk,mFCol,mMrkSz);
 return;
 }
@@ -258,14 +258,14 @@
 {
 int i;
-float *xtmp;
-float *ytmp;
+double *xtmp;
+double *ytmp;
 
 if( !mPSOut)  return;
 
-xtmp = new float[n];
-ytmp = new float[n];
+xtmp = new double[n];
+ytmp = new double[n];
 for(i=0;i<n;i++){
-  xtmp[i] = (float)x[i];
-  ytmp[i] = (float)y[i];
+  xtmp[i] = (double)x[i];
+  ytmp[i] = (double)y[i];
 }
 mPSOut->DrawMarkers(xtmp,ytmp,n,mMrk,mFCol, mMrkSz);
@@ -284,5 +284,5 @@
 if ((pix == NULL) || (cmap == NULL)) return;
 if(mPSOut) 
-  mPSOut->Image((float)x, (float)y, (float)sx, (float)sy, sx, sy, pix, cmap);
+  mPSOut->Image((double)x, (double)y, (double)sx, (double)sy, sx, sy, pix, cmap);
 return;
 }
@@ -455,5 +455,5 @@
 PIGrCoord PIGraphicPS::CalcStringWidth(char const* s)
 {
-return((float)(mFSize*strlen(s)*0.5));   /*  facteur 0.5 ad'hoc $CHECK$  Voir Nicolas ! */
+return((double)(mFSize*strlen(s)*0.5));   /*  facteur 0.5 ad'hoc $CHECK$  Voir Nicolas ! */
 }
 
Index: trunk/SophyaPI/PI/pigraphps.h
===================================================================
--- trunk/SophyaPI/PI/pigraphps.h	(revision 203)
+++ trunk/SophyaPI/PI/pigraphps.h	(revision 204)
@@ -9,6 +9,6 @@
 {
 public:
-                     PIGraphicPS(PSFile * psf, PIWdg* wdg, float ofx=0., float ofy=0.);
-                     PIGraphicPS(PSFile * psf, float x0, float y0, float dx, float dy);
+                     PIGraphicPS(PSFile * psf, PIWdg* wdg, double ofx=0., double ofy=0.);
+                     PIGraphicPS(PSFile * psf, double x0, double y0, double dx, double dy);
   virtual           ~PIGraphicPS();
 
@@ -32,7 +32,7 @@
   virtual void       DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc=true);  
   virtual void       DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
-                             float degdeb, float degfin);
+                             double degdeb, double degfin);
   virtual void       DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                              float degdeb, float degfin);
+                              double degdeb, double degfin);
   virtual void       DrawMarker(PIGrCoord x0, PIGrCoord y0);
   virtual void       DrawMarkers(PIGrCoord *x, PIGrCoord *y, int n);
@@ -74,9 +74,9 @@
 
 protected:
-  void           BuildFromPSFile(PSFile * psf, float x0, float y0, float dx, float dy);
+  void           BuildFromPSFile(PSFile * psf, double x0, double y0, double dx, double dy);
 
   PSFile * mPSOut;  /* Fichier PostScript */
-  float mXmin, mYmin;
-  float mXmax, mYmax;
+  double mXmin, mYmin;
+  double mXmax, mYmax;
 
   PIColors  mFCol, mBCol;
Index: trunk/SophyaPI/PI/pigraphuc.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphuc.cc	(revision 203)
+++ trunk/SophyaPI/PI/pigraphuc.cc	(revision 204)
@@ -21,5 +21,5 @@
 
 // Pour echanger deux valeurs PIGrCoord
-static inline void fl_swap(float& a, float& b) { float tmp = a; a = b; b = tmp; }
+static inline void dbl_swap(double& a, double& b) { double tmp = a; a = b; b = tmp; }
 
 //++
@@ -88,5 +88,5 @@
 //--
 //++
-// void       SetUCS(float xmin, float xmax, float ymin, float ymax, -
+// void       SetUCS(double xmin, double xmax, double ymin, double ymax, -
 // int axrl=kAxeDirSame, int ayud=kAxeDirSame)
 //	Définit le système de coordonnées utilisateur. Axe X de "xmin" à "xmax" , 
@@ -103,13 +103,13 @@
 //	Par défaut : "xmin=ymin=0." , "ymin=ymax=0." , "kAxeDirLtoR" , "kAxeDirDownUp"
 // 
-// void  UC2GrC(float x, float y, float& xpix, float& ypix)
+// void  UC2GrC(double x, double y, double& xpix, double& ypix)
 //	Transformation de coordonnées utilisateur "(x,y)" en coordoonnées 
 //	de l'espace graphic de départ "(xpix, ypix)"
-// void  GrC2UC(float xpix, float ypix, float& x, float& y)
+// void  GrC2UC(double xpix, double ypix, double& x, double& y)
 //	Transformation de coordonnées de l'espace graphic de départ. en coordonnées utilisateur.
-// void  DUC2GrC(float dx, float dy, float& dxpix, float& dypix)
+// void  DUC2GrC(double dx, double dy, double& dxpix, double& dypix)
 //	Transformation de distances selon X,Y en coordonnées utilisateur "dx, dy" en distance
 //	dans l'espace graphique de départ "dxpix , dypix".
-// void  DGrC2UC(float dxpix, float dypix, float& dx, float& dy)
+// void  DGrC2UC(double dxpix, double dypix, double& dx, double& dy)
 //	Transformation de distances selon X,Y dans l'espace graphique de départ en distance
 //	dans l'espace de  coordonnées utilisateur.
@@ -117,15 +117,15 @@
 
 /* --Methode-- */
-void PIGraphicUC::SetUCS(float xmin, float xmax, float ymin, float ymax,
+void PIGraphicUC::SetUCS(double xmin, double xmax, double ymin, double ymax,
                          int axrl, int ayud)
 {
 
   if (axrl == kAxeDirAuto) {
-    float ff;
+    double ff;
     if (xmax < xmin)  { axrl = kAxeDirRtoL;   ff=xmin;  xmin=xmax;  xmax=ff; }
     else  axrl = kAxeDirLtoR;
   }
   if (ayud == kAxeDirAuto) {
-    float ff;
+    double ff;
     if (ymax < ymin)  { ayud = kAxeDirUpDown;   ff=ymin;  ymin=ymax;  ymax=ff; }
     else  ayud = kAxeDirDownUp;
@@ -165,12 +165,12 @@
 
 /* --Methode-- */
-void PIGraphicUC::UC2GrC(float x, float y, float& xpix, float& ypix)
-{
-  xpix = (float)(xOrg + x*xScale);  
-  ypix = (float)(yOrg + y*yScale);  
-}
-
-/* --Methode-- */
-void PIGraphicUC::GrC2UC(float xpix, float ypix, float& x, float& y)
+void PIGraphicUC::UC2GrC(double x, double y, double& xpix, double& ypix)
+{
+  xpix = (double)(xOrg + x*xScale);  
+  ypix = (double)(yOrg + y*yScale);  
+}
+
+/* --Methode-- */
+void PIGraphicUC::GrC2UC(double xpix, double ypix, double& x, double& y)
 {
   x = (xpix-xOrg)/xScale;
@@ -179,5 +179,5 @@
 
 /* --Methode-- */
-void PIGraphicUC::DUC2GrC(float dx, float dy, float& dxpix, float& dypix)
+void PIGraphicUC::DUC2GrC(double dx, double dy, double& dxpix, double& dypix)
 {
   dxpix = dx*xScale;
@@ -188,5 +188,5 @@
 
 /* --Methode-- */
-void PIGraphicUC::DGrC2UC(float dxpix, float dypix, float& dx, float& dy)
+void PIGraphicUC::DGrC2UC(double dxpix, double dypix, double& dx, double& dy)
 {
   dx = dxpix/xScale;
@@ -200,5 +200,5 @@
 {
   if (!mGrC) return;
-  float x, y, dx, dy;
+  double x, y, dx, dy;
   x = xc;  dx = dxc;
   y = yc;  dy = dyc;
@@ -227,9 +227,9 @@
   }
 
-  float xf, yf, xf2, yf2;
+  double xf, yf, xf2, yf2;
   UC2GrC(x, y, xf, yf);
   UC2GrC(x+dx, y+dy, xf2, yf2);
-  if (xf2 < xf)  fl_swap(xf, xf2);
-  if (yf2 < yf)  fl_swap(yf, yf2);
+  if (xf2 < xf)  dbl_swap(xf, xf2);
+  if (yf2 < yf)  dbl_swap(yf, yf2);
   mGrC->Erase(xf, yf, xf2-xf, yf2-yf);
 }
@@ -239,5 +239,5 @@
 {
   if (!mGrC) return;
-  float xf, yf;
+  double xf, yf;
   UC2GrC(x, y, xf, yf);
   mGrC->DrawString(xf, yf, s, pos);  
@@ -248,5 +248,5 @@
 {
   if (!mGrC) return;
-  float xf, yf;
+  double xf, yf;
   UC2GrC(x, y, xf, yf);
   mGrC->DrawOpaqueString(xf, yf, s, pos);  
@@ -258,5 +258,5 @@
   
   if (!mGrC) return;
-  float x1, y1, x2, y2;
+  double x1, y1, x2, y2;
   x1 = xc1;  y1 = yc1;
   x2 = xc2;  y2 = yc2;
@@ -267,6 +267,6 @@
     if (y1 > yMax && y2 > yMax) return;
     if (x2 < x1) {
-      fl_swap(x1,x2);
-      fl_swap(y1,y2);
+      dbl_swap(x1,x2);
+      dbl_swap(y1,y2);
     }
     if (x2>xMax) {
@@ -279,6 +279,6 @@
     }
     if (y2 < y1) {
-      fl_swap(x1,x2);
-      fl_swap(y1,y2);
+      dbl_swap(x1,x2);
+      dbl_swap(y1,y2);
     }
     if (y2>yMax) {
@@ -292,5 +292,5 @@
   }
 
-  float xf1, yf1, xf2, yf2;
+  double xf1, yf1, xf2, yf2;
   UC2GrC(x1, y1, xf1, yf1);
   UC2GrC(x2, y2, xf2, yf2);
@@ -304,5 +304,5 @@
 {
   if (!mGrC) return;
-  float x, y, dx, dy;
+  double x, y, dx, dy;
   x = xc;  dx = dxc;
   y = yc;  dy = dyc;
@@ -331,9 +331,9 @@
   }
 
-  float xf, yf, xf2, yf2;
+  double xf, yf, xf2, yf2;
   UC2GrC(x, y, xf, yf);
   UC2GrC(x+dx, y+dy, xf2, yf2);
-  if (xf2 < xf)  fl_swap(xf, xf2);
-  if (yf2 < yf)  fl_swap(yf, yf2);
+  if (xf2 < xf)  dbl_swap(xf, xf2);
+  if (yf2 < yf)  dbl_swap(yf, yf2);
   mGrC->DrawBox(xf, yf, xf2-xf, yf2-yf);
 }  
@@ -343,5 +343,5 @@
 {
   if (!mGrC) return;
-  float x, y, dx, dy;
+  double x, y, dx, dy;
   x = xc;  dx = dxc;
   y = yc;  dy = dyc;
@@ -370,9 +370,9 @@
   }
 
-  float xf, yf, xf2, yf2;
+  double xf, yf, xf2, yf2;
   UC2GrC(x, y, xf, yf);
   UC2GrC(x+dx, y+dy, xf2, yf2);
-  if (xf2 < xf)  fl_swap(xf, xf2);
-  if (yf2 < yf)  fl_swap(yf, yf2);
+  if (xf2 < xf)  dbl_swap(xf, xf2);
+  if (yf2 < yf)  dbl_swap(yf, yf2);
   mGrC->DrawFBox(xf, yf, xf2-xf, yf2-yf);
 }  
@@ -383,5 +383,5 @@
   if (!mGrC) return;
 
-  float xf, yf, rf,rfy;
+  double xf, yf, rf,rfy;
   UC2GrC(x, y, xf, yf);
   DUC2GrC(r,r,rf,rfy);
@@ -395,5 +395,5 @@
   if (!mGrC) return;
 
-  float xf, yf, rf, rfy;
+  double xf, yf, rf, rfy;
   UC2GrC(x, y, xf, yf);
   DUC2GrC(r,r,rf,rfy);
@@ -407,5 +407,5 @@
   if (!mGrC) return;
 
-  float xf, yf, dxf, dyf;
+  double xf, yf, dxf, dyf;
   UC2GrC(x0, y0, xf, yf);
   DUC2GrC(dx, dy, dxf, dyf);
@@ -418,5 +418,5 @@
   if (!mGrC) return;
 
-  float xf, yf, dxf, dyf;
+  double xf, yf, dxf, dyf;
   UC2GrC(x0, y0, xf, yf);
   DUC2GrC(dx, dy, dxf, dyf);
@@ -432,5 +432,5 @@
   PIGrCoord *pxc, *pyc;
   int i;
-  float xf, yf;
+  double xf, yf;
  
   if (!mGrC) return;
@@ -454,5 +454,5 @@
   PIGrCoord *pxc, *pyc;
   int i;
-  float xf, yf;
+  double xf, yf;
  
   if (!mGrC) return;
@@ -473,9 +473,9 @@
 /* --Methode-- */
 void PIGraphicUC::DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
-                          float degdeb, float degfin)
-{
-  if (!mGrC) return;
-
-  float xf, yf, dxf, dyf;
+                          double degdeb, double degfin)
+{
+  if (!mGrC) return;
+
+  double xf, yf, dxf, dyf;
   UC2GrC(x0, y0, xf, yf);
   DUC2GrC(dx, dy, dxf, dyf);
@@ -484,9 +484,9 @@
 /* --Methode-- */
 void PIGraphicUC::DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
-                           float degdeb, float degfin)
-{
-  if (!mGrC) return;
-
-  float xf, yf, dxf, dyf;
+                           double degdeb, double degfin)
+{
+  if (!mGrC) return;
+
+  double xf, yf, dxf, dyf;
   UC2GrC(x0, y0, xf, yf);
   DUC2GrC(dx, dy, dxf, dyf);
@@ -498,5 +498,5 @@
 {
   if (!mGrC) return;
-  float xf, yf;
+  double xf, yf;
   UC2GrC(x0, y0, xf, yf);
   mGrC->DrawMarker(xf, yf);
@@ -510,5 +510,5 @@
   PIGrCoord *pxc, *pyc;
   int i;
-  float xf, yf;
+  double xf, yf;
  
   if (!mGrC) return;
@@ -533,5 +533,5 @@
   if ( (sx < 1) || (sy < 1) )  return;
   if ((pix == NULL) || (cmap == NULL)) return; 
-  float xf,yf;
+  double xf,yf;
   UC2GrC(x, y, xf, yf);
   mGrC->DrawPixmap(xf, yf, pix, sx, sy, cmap);
@@ -618,6 +618,6 @@
 {
   if (!mGrC) return;
-  float fx, fy;
-  DUC2GrC((float)sz, (float)sz, fx, fy);
+  double fx, fy;
+  DUC2GrC((double)sz, (double)sz, fx, fy);
   int npt = (int)fy;
   if (npt < 8) npt = 8;
@@ -631,6 +631,6 @@
 {
   if (!mGrC) return;
-  float fx, fy;
-  DUC2GrC((float)sz, (float)sz, fx, fy);
+  double fx, fy;
+  DUC2GrC((double)sz, (double)sz, fx, fy);
   int isz = int(0.5*(fx+fy+1));
   mGrC->SelMarker( isz, mrk);
@@ -711,5 +711,5 @@
   if (!mGrC) return(0);
   int h,a,d;
-  float fh, fa, fd, x;
+  double fh, fa, fd, x;
   h = mGrC->GetFontHeight(a, d) ;
   DGrC2UC(0., h, x, fh);
@@ -732,6 +732,6 @@
 {
   if (!mGrC) return(0.);
-  float dx = mGrC->CalcStringWidth(s);
-  float dxx, dxy;
+  double dx = mGrC->CalcStringWidth(s);
+  double dxx, dxy;
   DGrC2UC(dx, dx, dxx, dxy);
   return(dxx);
Index: trunk/SophyaPI/PI/pigraphuc.h
===================================================================
--- trunk/SophyaPI/PI/pigraphuc.h	(revision 203)
+++ trunk/SophyaPI/PI/pigraphuc.h	(revision 204)
@@ -32,5 +32,5 @@
 
 //  Definition des coordonnees utilisateur
-  virtual void       SetUCS(float xmin, float xmax, float ymin, float ymax,
+  virtual void       SetUCS(double xmin, double xmax, double ymin, double ymax,
                             int axrl=kAxeDirSame, int ayud=kAxeDirSame);     
 
@@ -49,7 +49,7 @@
   virtual void       DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc=true); 
   virtual void       DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
-                             float degdeb, float degfin);
+                             double degdeb, double degfin);
   virtual void       DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                              float degdeb, float degfin);
+                              double degdeb, double degfin);
  
   virtual void       DrawMarker(PIGrCoord x0, PIGrCoord y0);
@@ -97,8 +97,8 @@
 
 //  Transformation des ccordonnees
-  virtual void       UC2GrC(float x, float y, float& xpix, float& ypix);
-  virtual void       GrC2UC(float xpix, float ypix, float& x, float& y);
-  virtual void       DUC2GrC(float dx, float dy, float& dxpix, float& dypix);
-  virtual void       DGrC2UC(float dxpix, float dypix, float& dx, float& dy);
+  virtual void       UC2GrC(double x, double y, double& xpix, double& ypix);
+  virtual void       GrC2UC(double xpix, double ypix, double& x, double& y);
+  virtual void       DUC2GrC(double dx, double dy, double& dxpix, double& dypix);
+  virtual void       DGrC2UC(double dxpix, double dypix, double& dx, double& dy);
 
   void   NoClip() {clip = false; }
@@ -110,8 +110,8 @@
   PIGraphicGen* mGrC;
 
-  float xMin, xMax, yMin, yMax; // Valeurs en unites user
-  float xOrg, yOrg;             // Position en pixels de (0.0, 0.0)
-  float xScale, yScale;         // Pixels par unites graphiques
-  float xW0, yW0, xWd, yWd;        // Origine/largeur ds la fenetre de trace
+  double xMin, xMax, yMin, yMax; // Valeurs en unites user
+  double xOrg, yOrg;             // Position en pixels de (0.0, 0.0)
+  double xScale, yScale;         // Pixels par unites graphiques
+  double xW0, yW0, xWd, yWd;        // Origine/largeur ds la fenetre de trace
   bool   aXdir, aYdir;           // Sens des axes horiz, vertical 
   bool   clip;
Index: trunk/SophyaPI/PI/pigraphx.cc
===================================================================
--- trunk/SophyaPI/PI/pigraphx.cc	(revision 203)
+++ trunk/SophyaPI/PI/pigraphx.cc	(revision 204)
@@ -240,5 +240,5 @@
 /* --Methode-- */
 void PIGraphicX::DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                         float degdeb, float degfin)
+                         double degdeb, double degfin)
 {
 XDrawArc(XtDisplay (MyWdg()), mWId, DefGC(),
@@ -249,5 +249,5 @@
 /* --Methode-- */
 void PIGraphicX::DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                         float degdeb, float degfin)
+                         double degdeb, double degfin)
 {
 XFillArc(XtDisplay (MyWdg()), mWId, DefGC(),
Index: trunk/SophyaPI/PI/pigraphx.h
===================================================================
--- trunk/SophyaPI/PI/pigraphx.h	(revision 203)
+++ trunk/SophyaPI/PI/pigraphx.h	(revision 204)
@@ -33,7 +33,7 @@
   virtual void       DrawFPolygon(PIGrCoord *x, PIGrCoord *y, int n, bool cinc=true);  
   virtual void       DrawArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy,
-                             float degdeb, float degfin);
+                             double degdeb, double degfin);
   virtual void       DrawFArc(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy, 
-                              float degdeb, float degfin);
+                              double degdeb, double degfin);
   virtual void       DrawMarker(PIGrCoord x0, PIGrCoord y0);
   virtual void       DrawMarkers(PIGrCoord *x, PIGrCoord *y, int n);
Index: trunk/SophyaPI/PI/piimage.cc
===================================================================
--- trunk/SophyaPI/PI/piimage.cc	(revision 203)
+++ trunk/SophyaPI/PI/piimage.cc	(revision 204)
@@ -153,5 +153,5 @@
 //  SetSize(img->XSize(), img->YSize());
   CenterPave();
-  float min=1., max=-1., moy, sig;
+  double min=1., max=-1., moy, sig;
   int nbnul, nbsat;
   img->CheckDyn(min, max, moy, sig, nbnul, nbsat);
@@ -217,5 +217,5 @@
 if (showinfo && img)  { 
   char buff[256];
-  float x,y;
+  double x,y;
   img->XYCoord(xpav, ypav, x, y);
   sprintf(buff," X= %g , Y= %g  Pix= %g (%d,%d)      ", 
@@ -237,5 +237,5 @@
 
 /* --Methode-- */
-void PIImage::SetLut(float min, float max, int typlut, int lauto, bool refr)
+void PIImage::SetLut(double min, double max, int typlut, int lauto, bool refr)
 {
 if (lut) delete(lut);
@@ -243,5 +243,5 @@
   {
   int nbsig = lauto;  
-  float fracmax = 1. - 0.05*nbsig;
+  double fracmax = 1. - 0.05*nbsig;
   img->ComputeLut_PicHisto(min, max, nbsig, fracmax);
   }
@@ -381,5 +381,5 @@
 else {
   char buff[256];
-  float x,y;
+  double x,y;
   img->XYCoord(xpav, ypav, x, y);
   sprintf(buff," X= %g , Y= %g  Pix= %g (%d,%d)      ", 
@@ -423,5 +423,5 @@
 if (showinfo && img) {
   char buff[256];
-  float x,y;
+  double x,y;
   img->XYCoord(xpav, ypav, x, y);
   sprintf(buff," X= %g , Y= %g  Pix= %g (%d,%d)      ", 
@@ -567,5 +567,5 @@
  {
  char buff[256];  
- float x,y;
+ double x,y;
  img->XYCoord(xp, yp, x, y);
  sprintf(buff," X= %g , Y= %g  Pix= %g  (C= %d,%d)   ", 
@@ -669,5 +669,5 @@
 char pc[256];
 strncpy(pc, (char*)pdata, ll-1);  pc[ll-1] = '\0';
-float fx, fy;
+double fx, fy;
 img->Coord(xpav, ypav, fx, fy); 
 mdrw->ElAddText(fx, fy, pc );
@@ -717,5 +717,5 @@
 PosW2Img(xw1, yw1, &x1, &y1);
 PosW2Img(xw2, yw2, &x2, &y2);
-float fx1,fy1, fx2, fy2; 
+double fx1,fy1, fx2, fy2; 
 img->Coord(x1,y1, fx1, fy2);  // fy1 et fy2 echange expres pour utiliser kAxeDirAuto  
 img->Coord(x2,y2, fx2, fy1);  // En effet Image de haut vers bas, Axes de bas vers haut par defaut 
Index: trunk/SophyaPI/PI/piimage.h
===================================================================
--- trunk/SophyaPI/PI/piimage.h	(revision 203)
+++ trunk/SophyaPI/PI/piimage.h	(revision 204)
@@ -47,5 +47,5 @@
 
 //  Gestion du choix de LUT, facteur d agrandissement, table de couleur
-  void SetLut(float min, float max, int typlut=kLutType_Lin,
+  void SetLut(double min, double max, int typlut=kLutType_Lin,
               int lauto=0, bool refr=true);
   void SetLut(LUT *clut, bool refr=true);
Index: trunk/SophyaPI/PI/piimgtools.cc
===================================================================
--- trunk/SophyaPI/PI/piimgtools.cc	(revision 203)
+++ trunk/SophyaPI/PI/piimgtools.cc	(revision 204)
@@ -246,5 +246,5 @@
 void PIImgTools::Process(PIMessage msg, PIMsgHandler* /*sender*/, void* /*data*/)
 {
-float min, max, del;
+double min, max, del;
 int lauto, typ;
 int typlut[2] = {kLutType_Lin, kLutType_Log} ; 
@@ -266,11 +266,11 @@
     if (msg == 2700) {
       del = max_lut-min_lut;
-      min = min_lut+(float)mSc[0]->GetValue()/100*del;
-      max = max_lut+(float)mSc[0]->GetValue()/100*del;
+      min = min_lut+(double)mSc[0]->GetValue()/100*del;
+      max = max_lut+(double)mSc[0]->GetValue()/100*del;
     }
     if (msg == 2800) {
       del = max_lut-min_lut;
-      min = min_lut-(float)mSc[1]->GetValue()/100.*del*0.5;
-      max = max_lut+(float)mSc[1]->GetValue()/100.*del*0.5;
+      min = min_lut-(double)mSc[1]->GetValue()/100.*del*0.5;
+      max = max_lut+(double)mSc[1]->GetValue()/100.*del*0.5;
     }
     if ( (msg == 2700) || (msg == 2800) ) {
Index: trunk/SophyaPI/PI/pimenux.cc
===================================================================
--- trunk/SophyaPI/PI/pimenux.cc	(revision 203)
+++ trunk/SophyaPI/PI/pimenux.cc	(revision 204)
@@ -100,6 +100,6 @@
 PIMenuX::~PIMenuX()
 {
-for(int i=0; i<mNItem; i++)
-  XtDestroyWidget(mBut[i].itb);
+// for(int i=0; i<mNItem; i++)
+//  XtDestroyWidget(mBut[i].itb); Le destroy est fait par le widget menu lui-meme
 delete[] mBut ;
 }
Index: trunk/SophyaPI/PI/piscdrawwdg.cc
===================================================================
--- trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 203)
+++ trunk/SophyaPI/PI/piscdrawwdg.cc	(revision 204)
@@ -33,5 +33,5 @@
 //--
 
-static inline void fl_swap(float& a, float& b) { float tmp = a; a = b; b = tmp;  } 
+static inline void dbl_swap(double& a, double& b) { double tmp = a; a = b; b = tmp;  } 
 
 //++
@@ -44,5 +44,5 @@
 // long  kind()
 //	Renvoie le type ("=PIScDrawWdg::ClassId")
-// void SetLimits(float xmin, float xmax, float ymin, float ymax, -
+// void SetLimits(double xmin, double xmax, double ymin, double ymax, -
 //           int axrl=kAxeDirSame, int ayud=kAxeDirSame, bool tmp=false)
 //	Définit les limites de coordonnées.
@@ -111,5 +111,5 @@
 
 void
-PIScDrawWdg::SetLimits(float xmin, float xmax, float ymin, float ymax,
+PIScDrawWdg::SetLimits(double xmin, double xmax, double ymin, double ymax,
                        int axrl, int ayud, bool tmp)
 {
@@ -177,5 +177,5 @@
 // Gestion affichage coordonnees du point 
 
-string   PIScDrawWdg::GetClickText(float x, float y) 
+string   PIScDrawWdg::GetClickText(double x, double y) 
 // Donne le texte a afficher pour position x,y  
 {
@@ -224,5 +224,5 @@
 {
 
-  float dx, dy;
+  double dx, dy;
   mBDrw->GetGraphicUC()->GrC2UC(xp, yp, dx, dy); 
   mPPos[0] = dx;  mPPos[1] = dy; 
@@ -271,9 +271,9 @@
     SetLimits(xMinS, xMaxS, yMinS, yMaxS, kAxeDirSame, kAxeDirSame );
   else {
-    float xl,yl,xh,yh;
+    double xl,yl,xh,yh;
     mBDrw->GetGraphicUC()->GrC2UC(xBegDrag, yBegDrag, xl, yl);
     mBDrw->GetGraphicUC()->GrC2UC(xEndDrag, yEndDrag, xh, yh);
-    if (xl > xh) fl_swap(xl, xh);
-    if (yl > yh) fl_swap(yl, yh);
+    if (xl > xh) dbl_swap(xl, xh);
+    if (yl > yh) dbl_swap(yl, yh);
     SetLimits(xl,xh,yl,yh, kAxeDirSame, kAxeDirSame, true);
   }
@@ -323,7 +323,7 @@
 {
   if (mSz <= 0)  return;
-  float xmin, xmax, ymin, ymax;
+  double xmin, xmax, ymin, ymax;
   int i=0;
-  float cv;
+  double cv;
   if (mAy) {
     xmin = xmax = mAx->Value(0);
@@ -351,5 +351,5 @@
     }
 
-  float dx, dy;
+  double dx, dy;
   dx = 0.02*(xmax-xmin);
   dy = 0.02*(ymax-ymin);
@@ -361,7 +361,7 @@
 
 /* --Methode-- */
-void PIYfXDrawer::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax)
-{
-  float xp,yp;
+void PIYfXDrawer::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax)
+{
+  double xp,yp;
   int i;
 
@@ -381,5 +381,5 @@
 
 // Trace des lignes 
-  float xp2, yp2;
+  double xp2, yp2;
   if (mAy) { xp2 = mAx->Value(0); yp2 = mAy->Value(0); }
   else { xp2 = mAx->X(0);  yp2 = mAx->Value(0); }
@@ -412,16 +412,16 @@
 /* --Methode-- */
 void
-PIFuncDrawer::Draw(PIGraphicUC* g, float /*xmin*/, float/*ymin*/, float/*xmax*/, float/*ymax*/)
+PIFuncDrawer::Draw(PIGraphicUC* g, double /*xmin*/, double/*ymin*/, double/*xmax*/, double/*ymax*/)
 {
   PIGrCoord x1, x2, y1, y2;
   g->GetGrSpace(x1, x2, y1, y2);
-  float xMax = x2;
-  float xMin = x1;
-  float yMax = y2;
-  float yMin = y1;
-  float xStep = (xMax - xMin)/100;
-  float xOld = xMin;
-  float yOld = mFunc(xMin);
-  for (float x = xMin+xStep; x<xMax; x+=xStep) {
+  double xMax = x2;
+  double xMin = x1;
+  double yMax = y2;
+  double yMin = y1;
+  double xStep = (xMax - xMin)/100;
+  double xOld = xMin;
+  double yOld = mFunc(xMin);
+  for (double x = xMin+xStep; x<xMax; x+=xStep) {
     double y = mFunc(x);
     if (y>yMin && yOld>yMin && 
Index: trunk/SophyaPI/PI/piscdrawwdg.h
===================================================================
--- trunk/SophyaPI/PI/piscdrawwdg.h	(revision 203)
+++ trunk/SophyaPI/PI/piscdrawwdg.h	(revision 204)
@@ -26,5 +26,5 @@
   virtual long       kind() {return ClassId; }
   
-  virtual void       SetLimits(float xmin, float xmax, float ymin, float ymax, 
+  virtual void       SetLimits(double xmin, double xmax, double ymin, double ymax, 
                                int axrl=kAxeDirSame, int ayud=kAxeDirSame, bool tmp=false);
   virtual void	     UpdateLimits();  // Calcule et change les limites a partir de Drawer-No-1 
@@ -42,15 +42,15 @@
   inline PIElDrawer* BaseDrawer() { return mBDrw; };
 
-  float XMin() const {return mBDrw->XMin();}
-  float XMax() const {return mBDrw->XMax();}
-  float YMin() const {return mBDrw->YMin();}
-  float YMax() const {return mBDrw->YMax();}
-  float XPPos() const { return mPPos[0]; }
-  float YPPos() const { return mPPos[1]; }
+  double XMin() const {return mBDrw->XMin();}
+  double XMax() const {return mBDrw->XMax();}
+  double YMin() const {return mBDrw->YMin();}
+  double YMax() const {return mBDrw->YMax();}
+  double XPPos() const { return mPPos[0]; }
+  double YPPos() const { return mPPos[1]; }
   int    LimitsFixed() const {return mBDrw->LimitsFixed();}
   void   FreeLimits() { mBDrw->FreeLimits(); }
     
 
-  virtual string     GetClickText(float x, float y); // Donne le texte a afficher pour position x,y
+  virtual string     GetClickText(double x, double y); // Donne le texte a afficher pour position x,y
 
   void               SetTextWin(PILabel * tw, bool trw=true, int tx=300, int ty=30);
@@ -68,6 +68,6 @@
   
 protected:
-  float xMinS, xMaxS, yMinS, yMaxS; // Sauvegarde pour zoom
-  float mPPos[2];               // Position click souris X,Y
+  double xMinS, xMaxS, yMinS, yMaxS; // Sauvegarde pour zoom
+  double mPPos[2];               // Position click souris X,Y
 
   PIElDrawer* mBDrw;
@@ -99,5 +99,5 @@
   virtual           ~PIYfXDrawer();
   
-  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
+  virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
   virtual void       UpdateLimits();
   
@@ -120,5 +120,5 @@
   virtual           ~PIFuncDrawer();
   
-  virtual void       Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax);
+  virtual void       Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax);
 protected:
   FUNC               mFunc;
Index: trunk/SophyaPI/PI/pistzwin.cc
===================================================================
--- trunk/SophyaPI/PI/pistzwin.cc	(revision 203)
+++ trunk/SophyaPI/PI/pistzwin.cc	(revision 204)
@@ -177,5 +177,5 @@
 int k;
 for(k=0; k<NbChilds(); k++) { 
-  psf->NewPage((float)XSize(), (float)YSize(),PI_Auto);
+  psf->NewPage((double)XSize(), (double)YSize(),PI_Auto);
   GetChild(k)->PSPrint(psf, ofx, ofy);
   }
Index: trunk/SophyaPI/PI/pisurfdr.cc
===================================================================
--- trunk/SophyaPI/PI/pisurfdr.cc	(revision 203)
+++ trunk/SophyaPI/PI/pisurfdr.cc	(revision 204)
@@ -13,6 +13,6 @@
   arr->XYfromxy(arr->XSize(),arr->YSize(),mXmax, mYmax);
   if (asxy)  mScy = (mXmax-mXmin)/(mYmax-mYmin);
-  float scm =  ((mXmax-mXmin) > (mYmax-mYmin)) ? (mXmax-mXmin)  : (mYmax-mYmin);
-  int i,j;   float cv;
+  double scm =  ((mXmax-mXmin) > (mYmax-mYmin)) ? (mXmax-mXmin)  : (mYmax-mYmin);
+  int i,j;   double cv;
   mZmin = mZmax = arr->Value(0,0);
   for(i=0; i<arr->XSize(); i++) 
@@ -26,7 +26,7 @@
 //  printf("PISurfaceDrawer::PISurfaceDrawer Min/Max: %g,%g  %g,%g  %g,%g  Sc: %g %g %g \n",
 //          mXmin, mXmax, mYmin, mYmax, mZmin, mZmax, mScx, mScy, mScz);
-  float zmin = mZmin; 
-  float zmax = mZmax;
-  float dzz = (mZmax-mZmin)*0.05;
+  double zmin = mZmin; 
+  double zmax = mZmax;
+  double dzz = (mZmax-mZmin)*0.05;
   mLut = new LUT(zmin-dzz*2, zmax-dzz, 256);
 }
@@ -43,5 +43,5 @@
 {
   if (mArr == NULL)  return;
-  float xmin, xmax, ymin, ymax, zmin, zmax;
+  double xmin, xmax, ymin, ymax, zmin, zmax;
   xmin = mXmin*mScx;  xmax = mXmax*mScx;
   ymin = mYmin*mScy;  ymax = mYmax*mScy;
@@ -50,5 +50,5 @@
 // Distance D = Max(xmax-xmin,ymin-ymax)*2
 // Observateur en O = X+D, Yc+2*D 
-  float D = xmax-xmin;
+  double D = xmax-xmin;
   if (D < (ymax-ymin))  D = ymax-ymin;
   D *= 1.4;
@@ -70,5 +70,5 @@
 
 typedef struct   /*  structures pour trier en ZP les facettes */
-  { double dp;  float zh;  int ij;  } ZPSORT;
+  { double dp;  double zh;  int ij;  } ZPSORT;
 /* Nouvelle-Fonction */
 static int ijzpsort(const void * sp1, const void * sp2)
@@ -96,5 +96,5 @@
 
 /* --Methode-- */
-void PISurfaceDrawer::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax)
+void PISurfaceDrawer::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax)
 {
 // On trace les axes - En attendant de faire mieux - Reza 8/12/98
@@ -116,9 +116,9 @@
 
   ZPSORT* ijzp = new ZPSORT[xsz*ysz];
-  float* xw = new float[(xsz+1)*(ysz+1)];
-  float* yw = new float[(xsz+1)*(ysz+1)];
-  float* zw = new float[(xsz+1)*(ysz+1)];
-
-  float dx,dy;   // taille du bin 
+  double* xw = new double[(xsz+1)*(ysz+1)];
+  double* yw = new double[(xsz+1)*(ysz+1)];
+  double* zw = new double[(xsz+1)*(ysz+1)];
+
+  double dx,dy;   // taille du bin 
   dx = (mXmax-mXmin)*mScx/xsz; 
   dy = (mYmax-mYmin)*mScy/ysz;
@@ -126,5 +126,5 @@
   int i1,j1;
   int i,j,k,l;
-  float x,y,z,xp,yp,zp;
+  double x,y,z,xp,yp,zp;
 
   k = 0;
Index: trunk/SophyaPI/PI/pisurfdr.h
===================================================================
--- trunk/SophyaPI/PI/pisurfdr.h	(revision 203)
+++ trunk/SophyaPI/PI/pisurfdr.h	(revision 204)
@@ -17,5 +17,5 @@
   virtual void 		UpdateLimits();   // Calcule et change la vue-3D
 
-  virtual void 		Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, float ymax); 
+  virtual void 		Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 
   virtual void       	DrawAxes(PIGraphicUC* g);
 
@@ -23,8 +23,8 @@
   P2DArrayAdapter* mArr;
   bool mAda;
-  float mScz, mScx, mScy;
-  float mXmin, mXmax;
-  float mYmin, mYmax;
-  float mZmin, mZmax;
+  double mScz, mScx, mScy;
+  double mXmin, mXmax;
+  double mYmin, mYmax;
+  double mZmin, mZmax;
   LUT* mLut;
 };
Index: trunk/SophyaPI/PI/piwdggen.cc
===================================================================
--- trunk/SophyaPI/PI/piwdggen.cc	(revision 203)
+++ trunk/SophyaPI/PI/piwdggen.cc	(revision 204)
@@ -254,7 +254,7 @@
 
 if (!psf) return;
-psf->NewBloc((float)ofx+XPos(), (float)ofy+YPos(), (float)XSize(), (float)YSize(),
-             (float)XSize(), (float)YSize());
-psf->DrawBox(0., 0., (float)XSize(), (float)YSize());
+psf->NewBloc((double)ofx+XPos(), (double)ofy+YPos(), (double)XSize(), (double)YSize(),
+             (double)XSize(), (double)YSize());
+psf->DrawBox(0., 0., (double)XSize(), (double)YSize());
 sprintf(str,"PIWdgGen::PSPrint() Kind=%ld Name= %s", kind(), Nom().c_str());
 psf->DrawString(12., 12., str, PI_Black, PI_RomanFont, 10);
Index: trunk/SophyaPI/PI/piwdgx.cc
===================================================================
--- trunk/SophyaPI/PI/piwdgx.cc	(revision 203)
+++ trunk/SophyaPI/PI/piwdgx.cc	(revision 204)
@@ -195,5 +195,13 @@
 UnManage();
 if (curselwdg == this)  { SelectionLost(); curselwdg = NULL; }
-if (!sdw)  XtDestroyWidget(sdw);
+if (sdw)  { 
+// Pour gerer la double structure en Widget des PIWindowX
+  if (wmis == k_wmi_normal) XtDestroyWidget(sdw);
+  else if (wmis == k_wmi_cascade) { 
+    SysDWdg pwdg = XtParent(sdw);
+    XtDestroyWidget(sdw);
+    if (pwdg) XtDestroyWidget(pwdg);
+    }
+  }
 }
 
Index: trunk/SophyaPI/PI/piwdgx.h
===================================================================
--- trunk/SophyaPI/PI/piwdgx.h	(revision 203)
+++ trunk/SophyaPI/PI/piwdgx.h	(revision 204)
@@ -15,9 +15,4 @@
 typedef WidgetClass SysDWdgClass;
 
-
-enum WmIntState { k_wmi_unknown=0,
-                  k_wmi_normal=1, k_wmi_toplevel=2, 
-                  k_wmi_transient=3, k_wmi_override=4,
-                  k_wmi_appshell=5 };
 
 class PIWdgX : public PIWdgGen 
@@ -95,4 +90,11 @@
 
 protected:
+// Definit le type de Widget, en particulier pour la gestion des feneteres de haut niveau
+// k_wmi_cascade : Widget cree en cascade d'un autre (Exemple pour PIWIndowX)
+  enum WmIntState { k_wmi_unknown=0,
+                    k_wmi_normal=1, k_wmi_toplevel=2, 
+                    k_wmi_transient=3, k_wmi_override=4,
+                    k_wmi_appshell=5, k_wmi_cascade=6 };
+
   int 		InitXt(int narg=0, char *arg[]=NULL); 
 
Index: trunk/SophyaPI/PI/piwindowx.cc
===================================================================
--- trunk/SophyaPI/PI/piwindowx.cc	(revision 203)
+++ trunk/SophyaPI/PI/piwindowx.cc	(revision 204)
@@ -92,4 +92,5 @@
 
 CreateXtWdg(nom, xmFormWidgetClass, pwm->XtWdg(), sx, sy, 0, 0);
+wmis = k_wmi_cascade;
 }
 
@@ -97,4 +98,5 @@
 PIWindowX::~PIWindowX()
 {
+Hide();
 delete pwm;
 }
Index: trunk/SophyaPI/PI/psfile.cc
===================================================================
--- trunk/SophyaPI/PI/psfile.cc	(revision 203)
+++ trunk/SophyaPI/PI/psfile.cc	(revision 204)
@@ -243,6 +243,6 @@
 /* Dimensions des divers formats */
   struct PaperSize {
-      float width ;
-      float height ;
+      double width ;
+      double height ;
   };
 struct PaperSize PaperSizeTable[] = {
@@ -254,5 +254,5 @@
 
 
-float cm2pt(float x);
+double cm2pt(double x);
 
 
@@ -278,9 +278,9 @@
 //--
 //++
-// PSFile (const char * FileName, float sc = 1.0)
+// PSFile (const char * FileName, double sc = 1.0)
 //	Créateur pour fichier Encapsulated Postscript
 // PSFile (const char * FileName, PIOrientation orientation, -
 //         PIPaperSize paperSize= PI_A4, -
-//         float marginX = 5.0, float marginY = 5.0 )
+//         double marginX = 5.0, double marginY = 5.0 )
 //	Créateur pour fichier Postscript
 //--
@@ -294,5 +294,5 @@
  *
  */
-PSFile::PSFile(const char * FileName, float sc) 
+PSFile::PSFile(const char * FileName, double sc) 
 #if defined(__DECCXX) || defined(__KCC__) || defined(__aCC__)
     : mPSFileName(FileName==NULL? "unnamed.eps" : const_cast<char *>(FileName)),
@@ -359,5 +359,5 @@
 	       PIOrientation orientation,
 	       PIPaperSize   paperSize,
-	       float marginX, float marginY)
+	       double marginX, double marginY)
 #if defined(__DECCXX) || defined(__KCC__) || defined(__aCC__)
  :  mPSFileName (FileName == NULL ? "unnamed.ps" : const_cast<char *>(FileName)),
@@ -471,7 +471,7 @@
 }
 
-void  PSFile::NewPage(float Dx, float Dy, PIOrientation orientation) {
-
-float  tw, th; /* largeur & hauteur corrigees des marges */
+void  PSFile::NewPage(double Dx, double Dy, PIOrientation orientation) {
+
+double  tw, th; /* largeur & hauteur corrigees des marges */
 
     /* On ferme ce qui doit l'etre ... */
@@ -635,6 +635,6 @@
 
 
-void  PSFile::NewBloc(float x0, float y0, float Tx, float Ty,
-			      float Dx, float Dy){
+void  PSFile::NewBloc(double x0, double y0, double Tx, double Ty,
+			      double Dx, double Dy){
 
     /* Si pas de page, on s'en va */
@@ -692,7 +692,7 @@
   PIColor tmp = cmap.GetColor(cid) ; 
   fprintf(mPSFile, "/ur %.3f def /ug %.3f def /ub %.3f def \n", 
-          (float)(tmp.red)/65535., 
-          (float)(tmp.green)/65535., 
-          (float)(tmp.blue)/65535.) ; 
+          (double)(tmp.red)/65535., 
+          (double)(tmp.green)/65535., 
+          (double)(tmp.blue)/65535.) ; 
 }
 
@@ -704,5 +704,5 @@
 
 
-void  PSFile::DrawString  (float x,  float y, const char *s, 
+void  PSFile::DrawString  (double x,  double y, const char *s, 
 			   PIColors DrawColor, 
 			   PIFontAtt FontAtt, 
@@ -730,5 +730,5 @@
 
 
-void  PSFile::DrawLine    (float x1, float y1, float x2, float y2, 
+void  PSFile::DrawLine    (double x1, double y1, double x2, double y2, 
 		   PIColors DrawColor,
 		   PILineAtt LineAtt) {
@@ -769,5 +769,5 @@
 
 
-void  PSFile::DrawBox(float x0, float y0, float Tx, float Ty, 
+void  PSFile::DrawBox(double x0, double y0, double Tx, double Ty, 
 		      PIColors  DrawColor,
 		      PILineAtt LineAtt) {
@@ -791,5 +791,5 @@
 
 
-void  PSFile::DrawFBox(float x0, float y0, float Tx, float Ty, 
+void  PSFile::DrawFBox(double x0, double y0, double Tx, double Ty, 
 		   PIColors DrawColor,
 		   PIColors FillColor, 
@@ -818,5 +818,5 @@
 
 
-void  PSFile::DrawCircle  (float x0, float y0, float r, 
+void  PSFile::DrawCircle  (double x0, double y0, double r, 
 			   PIColors DrawColor,
 			   PILineAtt LineAtt) {
@@ -840,5 +840,5 @@
 
 
-void  PSFile::DrawFCircle (float x0, float y0, float r,
+void  PSFile::DrawFCircle (double x0, double y0, double r,
 		   PIColors DrawColor,
 		   PIColors FillColor, 
@@ -872,5 +872,5 @@
 
 // Les coordonnees sont supposees etre en mode incremental .
-void  PSFile::DrawPolygon (float *x, float *y, int n,
+void  PSFile::DrawPolygon (double *x, double *y, int n,
 		   PIColors DrawColor, 
 		   PILineAtt LineAtt, bool cinc) {
@@ -901,5 +901,5 @@
 
 
-void  PSFile::DrawFPolygon(float *x, float *y, int n,
+void  PSFile::DrawFPolygon(double *x, double *y, int n,
 		   PIColors DrawColor,
 		   PIColors FillColor,
@@ -938,5 +938,5 @@
 
 
-void  PSFile::DrawMarker  (float x0, float y0,
+void  PSFile::DrawMarker  (double x0, double y0,
 			   PIMarker MrkType,   
 			   PIColors DrawColor,
@@ -965,5 +965,5 @@
  *
  */
-void  PSFile::DrawMarkers (float *x0, float *y0, int n,
+void  PSFile::DrawMarkers (double *x0, double *y0, int n,
 			   PIMarker MrkType,
 			   PIColors DrawColor,
@@ -989,5 +989,5 @@
 }
 
-void PSFile::Image(float x0, float y0, float Tx, float Ty,
+void PSFile::Image(double x0, double y0, double Tx, double Ty,
 		   int Nx, int Ny,
 		   unsigned char *Pict, 
@@ -1034,5 +1034,5 @@
  */
 
-float cm2pt(float x) {
+double cm2pt(double x) {
     return (x*28.35);
 }
Index: trunk/SophyaPI/PI/psfile.h
===================================================================
--- trunk/SophyaPI/PI/psfile.h	(revision 203)
+++ trunk/SophyaPI/PI/psfile.h	(revision 204)
@@ -51,10 +51,10 @@
 /* Valable pour une page, ou un bloc */
 /*typedef struct {
- *  float X0;          Coordonnes sommet NO  
- *  float Y0;           en unites courantes  
- *  float Tx;          Format                
- *  float Ty;           en unites courantes  
- *  float Dx;          Coord sommet SE       
- *  float Dy;           en unites courantes  
+ *  double X0;          Coordonnes sommet NO  
+ *  double Y0;           en unites courantes  
+ *  double Tx;          Format                
+ *  double Ty;           en unites courantes  
+ *  double Dx;          Coord sommet SE       
+ *  double Dy;           en unites courantes  
  *  int orientation;   LANDSCAPE OU PORTRAIT 
  *} Format;
@@ -75,9 +75,9 @@
 public:
     /* Production fichier eps */
-    PSFile (const char * FileName, float sc = 1.0);
+    PSFile (const char * FileName, double sc = 1.0);
     /* Production fichier ps  */
     PSFile (const char * FileName, PIOrientation orientation, 
 	    PIPaperSize paperSize= PI_A4, 
-	    float marginX = 5.0, float marginY = 5.0 ) ;
+	    double marginX = 5.0, double marginY = 5.0 ) ;
 
     virtual      ~PSFile();
@@ -96,8 +96,8 @@
     virtual PIMarker    GetMarker();
 
-    virtual void  NewPage(float Dx, float Dy, PIOrientation orientation);
+    virtual void  NewPage(double Dx, double Dy, PIOrientation orientation);
     virtual void  EndPage();
-    virtual void  NewBloc(float x0, float y0, float Tx, float Ty,
-			  float Dx, float Dy);
+    virtual void  NewBloc(double x0, double y0, double Tx, double Ty,
+			  double Dx, double Dy);
     virtual void  EndBloc();
 
@@ -106,44 +106,44 @@
 
     /* Trace */
-    virtual void  DrawString  (float x,  float y, const char *s, 
+    virtual void  DrawString  (double x,  double y, const char *s, 
 			       PIColors DrawColor  = PI_NotDefColor, 
 			       PIFontAtt FontAtt   = PI_NotDefFontAtt, 
 			       int FontSize        = 8);
-    virtual void  DrawLine    (float x1, float y1, float x2, float y2, 
-			       PIColors DrawColor  = PI_NotDefColor,
-			       PILineAtt LineAtt   = PI_NotDefLineAtt);
-    virtual void  DrawBox     (float x0, float y0, float Tx, float Ty, 
-			       PIColors DrawColor  = PI_NotDefColor,
-			       PILineAtt LineAtt   = PI_NotDefLineAtt);
-    virtual void  DrawFBox    (float x0, float y0, float Tx, float Ty, 
+    virtual void  DrawLine    (double x1, double y1, double x2, double y2, 
+			       PIColors DrawColor  = PI_NotDefColor,
+			       PILineAtt LineAtt   = PI_NotDefLineAtt);
+    virtual void  DrawBox     (double x0, double y0, double Tx, double Ty, 
+			       PIColors DrawColor  = PI_NotDefColor,
+			       PILineAtt LineAtt   = PI_NotDefLineAtt);
+    virtual void  DrawFBox    (double x0, double y0, double Tx, double Ty, 
 			       PIColors DrawColor  = PI_NotDefColor,
 			       PIColors FillColor  = PI_NotDefColor, 
 			       PILineAtt LineAtt   = PI_NotDefLineAtt);
-    virtual void  DrawCircle  (float x0, float y0, float r, 
-			       PIColors DrawColor  = PI_NotDefColor,
-			       PILineAtt LineAtt   = PI_NotDefLineAtt);
-    virtual void  DrawFCircle (float x0, float y0, float r,
+    virtual void  DrawCircle  (double x0, double y0, double r, 
+			       PIColors DrawColor  = PI_NotDefColor,
+			       PILineAtt LineAtt   = PI_NotDefLineAtt);
+    virtual void  DrawFCircle (double x0, double y0, double r,
 			       PIColors DrawColor  = PI_NotDefColor,
 			       PIColors FillColor  = PI_NotDefColor, 
 			       PILineAtt LineAtt   = PI_NotDefLineAtt);
-    virtual void  DrawPolygon (float *x, float *y, int n,
+    virtual void  DrawPolygon (double *x, double *y, int n,
 			       PIColors DrawColor  = PI_NotDefColor, 
 			       PILineAtt LineAtt   = PI_NotDefLineAtt, 
                                bool cinc = true);
-    virtual void  DrawFPolygon(float *x, float *y, int n,
+    virtual void  DrawFPolygon(double *x, double *y, int n,
 			       PIColors DrawColor  = PI_NotDefColor,
 			       PIColors FillColor  = PI_NotDefColor,
 			       PILineAtt LineAtt   = PI_NotDefLineAtt, 
                                bool cinc = true);
-    virtual void  DrawMarker  (float x0, float y0, 
+    virtual void  DrawMarker  (double x0, double y0, 
 			       PIMarker MrkType    = PI_NotDefMarker, 
 			       PIColors DrawColor  = PI_NotDefColor,
 			       int MarkerSize=14);
-    virtual void  DrawMarkers (float *x0, float *y0, int n,
+    virtual void  DrawMarkers (double *x0, double *y0, int n,
 			       PIMarker MrkType    = PI_NotDefMarker,
 			       PIColors DrawColor  = PI_NotDefColor,
 			       int MarkerSize=14); 
 
-    virtual void  Image(float x0, float y0, float Tx, float Ty,
+    virtual void  Image(double x0, double y0, double Tx, double Ty,
 			int Nx, int Ny,
 			unsigned char *pict,
@@ -155,7 +155,7 @@
 	int    num;
 	char*  label;
-	float  X0, Y0;            /* coordonnees sommet NO */
-	float  Tx, Ty;            /* Format */
-	float  Dx, Dy;            /* Repere utilisateur */
+	double  X0, Y0;            /* coordonnees sommet NO */
+	double  Tx, Ty;            /* Format */
+	double  Dx, Dy;            /* Repere utilisateur */
 	long  begin,end,tmp;   /* offsets dans le fichier */
     } Bloc ;
@@ -167,5 +167,5 @@
 	int num;
 	int BlocCounter;
-	float Dx,Dy;              /* Sommet SE (unites utilisateur) */ 
+	double Dx,Dy;              /* Sommet SE (unites utilisateur) */ 
 	PIOrientation orientation;
 	long  begin, end, tmp;    /* Offsets dans le fichier */
@@ -179,9 +179,9 @@
     FILE *   mPSFile;
     const char *   mPSFileName;
-    float    Tw,Th ;              /* Format, en cm */
-    float    WMargin,HMargin ;    /* Marges minimales */
+    double    Tw,Th ;              /* Format, en cm */
+    double    WMargin,HMargin ;    /* Marges minimales */
     int      isEPS;               /* Vrai si PostScript Encapsule */
     long     boundingBox;         /* Endroit ou est specifiee la bb */
-    float    scale;               /* boundingbox = Dx*scale ; Dy*scale */
+    double    scale;              /* boundingbox = Dx*scale ; Dy*scale */
     PIPaperSize mPaperSize ; 
     int      PageCounter;         /* nbr pages */
