Changeset 205 in Sophya
- Timestamp:
- Mar 1, 1999, 6:05:59 PM (27 years ago)
- Location:
- trunk/SophyaPI/PIext
- Files:
-
- 18 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PIext/pigfd1.cc
r165 r205 47 47 dx = 0.02*(xmax-xmin); 48 48 dy = 0.02*(ymax-ymin); 49 SetLimits(( float)xmin-dx,(float)xmax+dx,(float)ymin-dy,(float)ymax+dy);49 SetLimits((double)xmin-dx,(double)xmax+dx,(double)ymin-dy,(double)ymax+dy); 50 50 SetAxesFlags(kBoxAxes | kExtTicks | kLabels); 51 51 } 52 52 53 53 /* --Methode-- */ 54 void PIGenFitDat::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax)54 void PIGenFitDat::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 55 55 { 56 56 if (!mGFD) return; … … 59 59 // On plotte les barre d'erreurs ligne demandee explicitement 60 60 if(mLAtt!=PI_NotDefLineAtt) SelectErrBar(true,true); 61 floatxp,yp,er;61 double xp,yp,er; 62 62 for (int i=0; i<mGFD->NData(); i++) { 63 63 xp = mGFD->Absc(VarX,i); -
trunk/SophyaPI/PIext/pigfd1.h
r165 r205 10 10 virtual ~PIGenFitDat(); 11 11 12 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax);12 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 13 13 virtual void UpdateLimits(); 14 14 -
trunk/SophyaPI/PIext/pigfd2.cc
r185 r205 48 48 if(zmax<=zmin) zmax = zmin+1.; 49 49 // Voir commentaires pintuple3d.cc 50 floatD = xmax-xmin;50 double D = xmax-xmin; 51 51 if (D < (ymax-ymin)) D = ymax-ymin; 52 52 D *= 1.4; … … 61 61 62 62 /* --Methode-- */ 63 void PIGenFitDat3D::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax)63 void PIGenFitDat3D::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 64 64 { 65 65 // On trace les axes - En attendant de faire mieux - Reza 8/12/98 … … 81 81 if (mLAtt == PI_NotDefLineAtt) g3->SelLine(PI_ThinLine); 82 82 83 floatxp,yp,zp,er;83 double xp,yp,zp,er; 84 84 for (int i=0; i<mGFD->NData(); i++) { 85 85 xp = mGFD->Absc(VarX,i); -
trunk/SophyaPI/PIext/pigfd2.h
r165 r205 10 10 virtual ~PIGenFitDat3D(); 11 11 12 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax);12 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 13 13 virtual void UpdateLimits(); 14 14 -
trunk/SophyaPI/PIext/pihisto.cc
r203 r205 38 38 39 39 void 40 PIHisto::Draw(PIGraphicUC* g, float /*xmin*/, float /*ymin*/, float /*xmax*/, float/*ymax*/)40 PIHisto::Draw(PIGraphicUC* g, double /*xmin*/, double /*ymin*/, double /*xmax*/, double /*ymax*/) 41 41 { 42 42 bool oktrace = false; … … 46 46 // Marqeurs definis OU HBProf => marqueurs+Erreurs si il y en a 47 47 if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine); 48 floatx1,y1, x2,y2;49 floatbw = mHisto->BinWidth();48 double x1,y1, x2,y2; 49 double bw = mHisto->BinWidth(); 50 50 for (int i=0; i<mHisto->NBins(); i++) { 51 51 if(mHisto->Error(i)>0.) { … … 68 68 } 69 69 if (mLAtt != PI_NotDefLineAtt) { 70 floatx1,y1, x2, y2;70 double x1,y1, x2, y2; 71 71 x1 = mHisto->BinLowEdge(0); 72 72 y1 = 0; … … 85 85 if( !oktrace ) { 86 86 for(int i=0; i<mHisto->NBins(); i++) { 87 floatleft = mHisto->BinLowEdge(i);88 floatwidth = mHisto->BinWidth();89 floatbottom = 0;90 floatheight = (*mHisto)(i);87 double left = mHisto->BinLowEdge(i); 88 double width = mHisto->BinWidth(); 89 double bottom = 0; 90 double height = (*mHisto)(i); 91 91 g->DrawFBox(left,bottom,width,height); 92 92 g->DrawLine(left, bottom, left, bottom + height); // Au moins une ligne... … … 103 103 // if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine); 104 104 g->SelLine(PI_ThinLine); 105 floatcellHeight = (YMax() - YMin()) * 0.05;106 floatcellWidth = (XMax() - XMin()) * 0.23;105 double cellHeight = (YMax() - YMin()) * 0.05; 106 double cellWidth = (XMax() - XMin()) * 0.23; 107 107 g->DrawLine(XMax() - cellWidth, YMax(), 108 108 XMax() - cellWidth, YMax() - cellHeight); -
trunk/SophyaPI/PIext/pihisto.h
r165 r205 9 9 PIHisto(Histo* histo, bool ad=false); 10 10 virtual ~PIHisto(); 11 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax);11 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 12 12 virtual void UpdateLimits(); 13 13 virtual void DrawStats(PIGraphicUC* g); -
trunk/SophyaPI/PIext/pihisto2d.cc
r165 r205 157 157 158 158 //++ 159 void PIHisto2D::Draw(PIGraphicUC* g, float,float, float, float)159 void PIHisto2D::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 160 160 // 161 161 // Dessin de l'histogramme. … … 164 164 if(!mHisto) return; 165 165 // Caracteristiques histogramme 166 floatdx = mHisto->WBinX(),dy = mHisto->WBinY();167 floatp1dx,p1dy;166 double dx = mHisto->WBinX(),dy = mHisto->WBinY(); 167 double p1dx,p1dy; 168 168 g->DGrC2UC(1.f,1.f,p1dx,p1dy); 169 169 … … 197 197 int FontSize = g->GetFontSize(); 198 198 if(mTypDisp==2) { 199 floatdxg,dyg,dg;199 double dxg,dyg,dg; 200 200 g->DUC2GrC(dx,dy,dxg,dyg); 201 201 dg =(dxg<dyg) ? dxg : dyg; … … 235 235 } 236 236 237 // Pour ne pas dessiner en dehors des axes 238 if ( (left0+dx/2. < xmin) || (left0+dx/2. > xmax) || 239 (bottom0+dy/2. < ymin) || (bottom0+dy/2. > ymax) ) continue; 240 237 241 // Dessin proprement dit selon le choix graphique. 238 242 if(mTypDisp==0) { 239 243 //..... carres de tailles variables 240 floatleft = left0 + 0.5*(1.-fracred)*dx, width = fracred*dx;241 floatbottom = bottom0 + 0.5*(1.-fracred)*dy, height = fracred*dy;244 double left = left0 + 0.5*(1.-fracred)*dx, width = fracred*dx; 245 double bottom = bottom0 + 0.5*(1.-fracred)*dy, height = fracred*dy; 242 246 if (cmap) g->DrawFBox(left,bottom,width,height); 243 247 else g->DrawBox(left,bottom,width,height); … … 246 250 int ipt = int( (float) npt *frac ); 247 251 for(int k=0;k<ipt;k++) { 248 floatx = left0 + frand01()*dx;249 floaty = bottom0 + frand01()*dy;252 double x = left0 + frand01()*dx; 253 double y = bottom0 + frand01()*dy; 250 254 g->DrawMarker(x,y); 251 255 } … … 254 258 char c[2]; 255 259 c[0] = HPrint2(frac); c[1]='\0'; 256 floatx = left0 + dx/2.;257 floaty = bottom0 + dy/2.;260 double x = left0 + dx/2.; 261 double y = bottom0 + dy/2.; 258 262 g->DrawString(x,y,c); 259 263 } else if(mTypDisp==3) { … … 283 287 // Une boite dans le coin superieur droit 284 288 if (mLAtt == PI_NotDefLineAtt) g->SelLine(PI_ThinLine); 285 floatcellHeight = (YMax() - YMin()) * 0.05;286 floatcellWidth = (XMax() - XMin()) * 0.23;289 double cellHeight = (YMax() - YMin()) * 0.05; 290 double cellWidth = (XMax() - XMin()) * 0.23; 287 291 g->DrawLine(XMax() - cellWidth, YMax(), 288 292 XMax() - cellWidth, YMax() - cellHeight); … … 331 335 //-- 332 336 { 333 floatdx = mHisto->WBinX(),dy = mHisto->WBinY();334 floatdxg,dyg;337 double dx = mHisto->WBinX(),dy = mHisto->WBinY(); 338 double dxg,dyg; 335 339 g->DUC2GrC(dx,dy,dxg,dyg); 336 340 int np = (int) dxg * (int) dyg; … … 413 417 414 418 //++ 415 string PIH2DWdg::GetClickText( float x, floaty)419 string PIH2DWdg::GetClickText(double x, double y) 416 420 // 417 421 // Quand on click (and drag) le bouton-1, affichage -
trunk/SophyaPI/PIext/pihisto2d.h
r165 r205 21 21 void UseFrac(float frmin=0.1, float frmax=0.9); 22 22 void Print(int lp=0); 23 virtual void Draw(PIGraphicUC* g, float xmin,float ymin,float xmax,floatymax);23 virtual void Draw(PIGraphicUC* g,double xmin,double ymin,double xmax,double ymax); 24 24 virtual void UpdateLimits(); 25 25 virtual void DrawStats(PIGraphicUC* g); … … 64 64 inline PIHisto2D* GetPIHisto() {return mPih;} 65 65 66 virtual string GetClickText( float x, floaty);66 virtual string GetClickText(double x, double y); 67 67 virtual void But3Press(int x, int y); 68 68 -
trunk/SophyaPI/PIext/pimgadapter.h
r165 r205 12 12 13 13 virtual ~RzImageAdapter() { if (aDel) delete mImg; } 14 virtual floatValue(int ix, int iy) { return mImg->FValue(ix, iy); }14 virtual double Value(int ix, int iy) { return mImg->FValue(ix, iy); } 15 15 16 16 protected : … … 27 27 28 28 virtual ~ImageAdapter() { if (aDel) delete mImg; } 29 virtual floatValue(int ix, int iy) { return((*mImg)(ix, iy)); }29 virtual double Value(int ix, int iy) { return((*mImg)(ix, iy)); } 30 30 31 31 protected : -
trunk/SophyaPI/PIext/pintup3d.cc
r185 r205 62 62 // Distance D = Max(xmax-xmin,ymin-ymax)*2 63 63 // Observateur en O = X+D, Yc+2*D 64 floatD = xmax-xmin;64 double D = xmax-xmin; 65 65 if (D < (ymax-ymin)) D = ymax-ymin; 66 66 D *= 1.4; … … 84 84 85 85 /* --Methode-- */ 86 void PINTuple3D::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax)86 void PINTuple3D::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 87 87 { 88 floatxp,yp,zp,xer,yer,zer;88 double xp,yp,zp,xer,yer,zer; 89 89 int nok; 90 90 -
trunk/SophyaPI/PIext/pintup3d.h
r165 r205 10 10 virtual ~PINTuple3D(); 11 11 12 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax);12 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 13 13 virtual void UpdateLimits(); 14 14 -
trunk/SophyaPI/PIext/pintuple.cc
r165 r205 63 63 64 64 /* --Methode-- */ 65 void PINTuple::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax)65 void PINTuple::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 66 66 { 67 floatxp,yp,xer,yer;67 double xp,yp,xer,yer; 68 68 int nok; 69 69 -
trunk/SophyaPI/PIext/pintuple.h
r165 r205 10 10 virtual ~PINTuple(); 11 11 12 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax);12 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 13 13 virtual void UpdateLimits(); 14 14 -
trunk/SophyaPI/PIext/pipodrw.cc
r165 r205 31 31 32 32 void 33 PIGFFDrawer::Draw(PIGraphicUC* g, float /*xmin*/, float/*ymin*/, float/*xmax*/, float/*ymax*/)33 PIGFFDrawer::Draw(PIGraphicUC* g, double /*xmin*/, double/*ymin*/, double/*xmax*/, double/*ymax*/) 34 34 { 35 35 PIGrCoord x1, x2, y1, y2; 36 36 g->GetGrSpace(x1, x2, y1, y2); 37 floatxMax = x2;38 floatxMin = x1;39 floatyMax = y2;40 floatyMin = y1;41 floatxStep = (xMax - xMin)/100;42 floatxOld = xMin;43 floatyOld = 0;44 // floatyOld = f->Value(&xMin, mParms);45 for ( floatx = xMin+xStep; x<xMax; x+=xStep) {46 floaty = 0; // $CHECK$47 // floaty = f->Value(&x, mParms);37 double xMax = x2; 38 double xMin = x1; 39 double yMax = y2; 40 double yMin = y1; 41 double xStep = (xMax - xMin)/100; 42 double xOld = xMin; 43 double yOld = 0; 44 // double yOld = f->Value(&xMin, mParms); 45 for (double x = xMin+xStep; x<xMax; x+=xStep) { 46 double y = 0; // $CHECK$ 47 // double y = f->Value(&x, mParms); 48 48 if (y>yMin && yOld>yMin && 49 49 y<yMax && yOld<yMax) … … 72 72 73 73 /* --Methode-- */ 74 floatPOVectorAdapter::Value(int i)74 double POVectorAdapter::Value(int i) 75 75 { 76 76 return((*mVec)(i)); … … 96 96 97 97 /* --Methode-- */ 98 floatPOH2DAdapter::Value(int ix, int iy)98 double POH2DAdapter::Value(int ix, int iy) 99 99 { 100 100 return((*mH2d)(ix, iy)); … … 120 120 121 121 /* --Methode-- */ 122 floatPOMatrixAdapter::Value(int ix, int iy)122 double POMatrixAdapter::Value(int ix, int iy) 123 123 { 124 124 // Attention MatrixAdapter(X=Colonne, Y= Row) = Matrix(row, col) -
trunk/SophyaPI/PIext/pipodrw.h
r165 r205 20 20 virtual ~PIGFFDrawer(); 21 21 22 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax);22 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 23 23 virtual void SetParms(double const*); 24 24 protected: … … 34 34 POVectorAdapter(Vector* v, bool ad=false); 35 35 virtual ~POVectorAdapter(); 36 virtual floatValue(int i);36 virtual double Value(int i); 37 37 38 38 protected: … … 47 47 virtual ~POH2DAdapter(); 48 48 49 virtual floatValue(int ix, int iy);49 virtual double Value(int ix, int iy); 50 50 51 51 protected: … … 61 61 virtual ~POMatrixAdapter(); 62 62 63 virtual floatValue(int ix, int iy);63 virtual double Value(int ix, int iy); 64 64 65 65 protected: -
trunk/SophyaPI/PIext/pistdimgapp.cc
r203 r205 199 199 int i; 200 200 201 delete mc; 201 202 for(i=0; i<6; i++) 202 203 if (m[i]) delete m[i]; 203 delete mc;204 204 205 205 WindMList::iterator it; -
trunk/SophyaPI/PIext/pistlist.cc
r165 r205 43 43 44 44 // Commencer par trouver nos limites 45 floatdx, dy;45 double dx, dy; 46 46 double x1, x2, y1, y2; 47 47 mStL->CalcXYLimits(x1, x2, y1, y2); … … 56 56 57 57 /* --Methode-- */ 58 void PIStarList::Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax)58 void PIStarList::Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax) 59 59 { 60 60 BStar *sti; 61 float xp,yp,flx; 61 double xp,yp; 62 float flx; 62 63 int sz; 63 64 char buff[128]; … … 85 86 if (mDspFV) { 86 87 sprintf(buff," F=%g", flx); 87 floatdx,dy;88 double dx,dy; 88 89 g->DGrC2UC(sz, 4, dx, dy); 89 90 g->DrawString(xp+dx, yp-dy, buff); -
trunk/SophyaPI/PIext/pistlist.h
r165 r205 10 10 virtual ~PIStarList(); 11 11 12 virtual void Draw(PIGraphicUC* g, float xmin, float ymin, float xmax, floatymax);12 virtual void Draw(PIGraphicUC* g, double xmin, double ymin, double xmax, double ymax); 13 13 virtual void UpdateLimits(); 14 14
Note:
See TracChangeset
for help on using the changeset viewer.