Changeset 117 in Sophya
- Timestamp:
- Jul 6, 1998, 10:12:18 AM (27 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/parradapter.cc
r114 r117 64 64 float maxpix = min; 65 65 float pixv; 66 printf("DEBUG_CHECKDYN-IN %d - %g %g ", vit, min, max);66 // printf("DEBUG_CHECKDYN-IN %d - %g %g ", vit, min, max); 67 67 68 68 int n = 0; … … 100 100 else { moy = 0.; sig = -1.; } 101 101 102 printf("DEBUG_CHECKDYN: %d %g %g - %g %g \n", n, min, max, moy, sig);102 // printf("DEBUG_CHECKDYN: %d %g %g - %g %g \n", n, min, max, moy, sig); 103 103 return(n); 104 104 } -
trunk/SophyaPI/PI/pigraphx.cc
r114 r117 659 659 BigFontIndex = (kksel < NMAXFONTSZ-2) ? kksel+2 : NMAXFONTSZ-1 ; 660 660 661 printf("PIGraphicX::Init()-DBG- FontIndex= %d %d %d (%d) \n",662 SmallFontIndex, NormalFontIndex, BigFontIndex, szf);661 //printf("PIGraphicX::Init()-DBG- FontIndex= %d %d %d (%d) \n", 662 // SmallFontIndex, NormalFontIndex, BigFontIndex, szf); 663 663 664 664 /* Les couleurs */ -
trunk/SophyaPI/PI/piimage.cc
r116 r117 610 610 yw2 = yspxm+yw1; 611 611 SetDefaultDrawRectangle(xw1, yw1, xw2, yw2, false); 612 printf("--DBG-- ComputePixmap() %d %d $ %d %d :: %d %d , %d %d \n", xwsz, ywsz, xspxm, yspxm, xw1, yw1, xw2, yw2);612 // printf("--DBG-- ComputePixmap() %d %d $ %d %d :: %d %d , %d %d \n", xwsz, ywsz, xspxm, yspxm, xw1, yw1, xw2, yw2); 613 613 int x1,y1, x2,y2; 614 614 ofx = xw1; ofy = yw1; … … 619 619 img->Coord(x2,y2, fx2, fy1); // En effet Image de haut vers bas, Axes de bas vers haut par defaut 620 620 SetDefaultDrawerLimits(fx1, fx2, fy1, fy2, kAxeDirAuto, kAxeDirAuto); 621 printf("--DBG2-- ComputePixmap() %g %g %g %g \n", fx1, fx2, fy1, fy2);621 // printf("--DBG2-- ComputePixmap() %g %g %g %g \n", fx1, fx2, fy1, fy2); 622 622 xcurs = ycurs = -1; 623 623 SetPixmap(pixm, xspxm, yspxm, true, xw1, yw1); -
trunk/SophyaPI/PI/piimgtools.cc
r116 r117 32 32 spy = bsy/4; 33 33 34 int wszx = 8*spx+3*bsx+ 1.5*bsy;35 int wszy = 10*spy+ 7*bsy;34 int wszx = 8*spx+3*bsx+2*bsy; 35 int wszy = 10*spy+9*bsy; 36 36 SetSize(wszx, wszy); 37 37 … … 82 82 mOpt[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 83 83 84 cpy += spy+bsy;84 cpy += 2*spy+bsy; 85 85 cpx = bsx/2; 86 86 mBut[0] = new PIButton(this, "Apply", 2500, bsx*1.5, bsy, cpx, cpy); … … 90 90 mBut[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 91 91 92 int offy = cpy+bsy+spy* 2;92 int offy = cpy+bsy+spy*3; 93 93 printf("-DBG- PIImgLutWind() SzX,Y= %d %d , ButPos= %d %d (off=%d)\n", wszx, wszy, cpx, cpy, offy); 94 94 95 cpx = 5*spx+2.5*bsx;95 cpx = 6*spx+2.75*bsx; 96 96 cpy = 2*spy; 97 mSc[0] = new PIScale(this, " offset-lut", 2700, false, bsy*0.75, 4.5*bsy, cpx, cpy);97 mSc[0] = new PIScale(this, "sc-offset-lut", 2700, false, bsy*0.75, 4.5*bsy, cpx, cpy); 98 98 cpx += 1.5*bsy; 99 mSc[1] = new PIScale(this, " offset-lut", 2800, false, bsy*0.75, 4.5*bsy, cpx, cpy);99 mSc[1] = new PIScale(this, "sc-dyn-lut", 2800, false, bsy*0.75, 4.5*bsy, cpx, cpy); 100 100 mSc[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 101 101 mSc[0]->SetMinMax(-50, 50); … … 106 106 107 107 // Option-Menu Couleur/Zoom 108 cpx = 2*spx;108 cpx = 3*spx; 109 109 cpy = offy; 110 110 mOptzc[0] = new PIOptMenu(this, "imglut-opt-3", 1.5*bsx, bsy, cpx, cpy); … … 120 120 mOptzc[0]->AppendItem("Col16", 210); 121 121 mOptzc[0]->SetValue(203); 122 123 cpx += 1.5*bsx+2*spx; 122 mOptzc[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 123 124 cpx += 1.5*bsx+3*spx; 124 125 mOptzc[1] = new PIOptMenu(this, "imglut-opt-4", 1.5*bsx, bsy, cpx, cpy); 125 126 mOptzc[1]->AppendItem("Agr. x10", 110); … … 139 140 mOptzc[1]->AppendItem("Red. /10", 90); 140 141 mOptzc[1]->SetValue(101); 142 mOptzc[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 143 144 cpx = 2*spx; 145 cpy += bsy+spy; 146 mButsz[0] = new PIButton(this, "1x1", 3201, bsx/2, bsy, cpx, cpy); 147 mButsz[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 148 cpx += bsx/2+spx; 149 mButsz[1] = new PIButton(this, "1x2", 3202, bsx/2, bsy, cpx, cpy); 150 mButsz[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 151 cpx += bsx/2+spx; 152 mButsz[2] = new PIButton(this, "1x4", 3204, bsx/2, bsy, cpx, cpy); 153 mButsz[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 154 cpx += bsx/2+spx; 155 mButsz[3] = new PIButton(this, "1/2", 3198, bsx/2, bsy, cpx, cpy); 156 mButsz[3]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 157 cpx += bsx/2+spx; 158 mButsz[4] = new PIButton(this, "1/4", 3196, bsx/2, bsy, cpx, cpy); 159 mButsz[4]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 160 161 cpx = 2*spx; 162 cpy += bsy+spy; 163 mButcax[0] = new PIButton(this, "- X", 5201, bsx/2, bsy, cpx, cpy); 164 mButcax[0]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 165 cpx += bsx/2+spx; 166 mButcax[1] = new PIButton(this, "- Y", 5202, bsx/2, bsy, cpx, cpy); 167 mButcax[1]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 168 cpx += bsx/2+spx; 169 mButcax[2] = new PIButton(this, "X<>Y", 5203, bsx/2, bsy, cpx, cpy); 170 mButcax[2]->SetBinding(PIBK_elastic,PIBK_elastic, PIBK_elastic,PIBK_elastic); 141 171 142 172 curlutw = this; … … 158 188 delete mOptzc[i]; 159 189 } 190 for(int i=0; i<5; i++) delete mButsz[i]; 191 for(int i=0; i<3; i++) delete mButcax[i]; 192 160 193 } 161 194 … … 191 224 192 225 msg = UserMsg(msg); 226 227 if (msg == 2600) { this->Hide(); return; } 228 PIImage* mpii = PIImage::CurrentPIImage(); 229 if (mpii == NULL) return; 230 193 231 switch (msg) 194 232 { 195 case 2600:196 this->Hide();197 break;198 233 case 2500: 199 234 case 2700 : 200 235 case 2800 : 201 236 { 202 if (PIImage::CurrentPIImage() == NULL) return;203 237 min = atof(mText[0]->GetText().c_str()); 204 238 max = atof(mText[1]->GetText().c_str()); 205 239 if (msg == 2700) { 240 del = max-min; 206 241 min += (float)mSc[0]->GetValue()/100*del; 207 242 max += (float)mSc[0]->GetValue()/100*del; 208 243 } 209 244 if (msg == 2800) { 210 min -= (float)mSc[0]->GetValue()/100*del*0.5; 211 max += (float)mSc[0]->GetValue()/100*del*0.5; 245 del = max-min; 246 min -= (float)mSc[1]->GetValue()/100.*del*0.5; 247 max += (float)mSc[1]->GetValue()/100.*del*0.5; 212 248 } 213 249 if ( (msg == 2700) || (msg == 2800) ) { … … 228 264 break; 229 265 266 case 3201 : 267 case 3202 : 268 case 3204 : 269 case 3198 : 270 case 3196 : 271 { 272 PIImage* pimg = PIImage::CurrentPIImage(); 273 printf(" --DBG-- msg= %ld pimg= %lx \n", (long)msg, (long)pimg); 274 int zm = msg-3200; 275 pimg->SetZoom(zm, false); 276 int sx, sy, snx, sny; 277 sx = pimg->XSize(); 278 sy = pimg->YSize(); 279 if (zm > 0) 280 { 281 snx = pimg->Image()->XSize()*zm; 282 sny = pimg->Image()->YSize()*zm; 283 } 284 else 285 { 286 snx = pimg->Image()->XSize()/(-zm); 287 sny = pimg->Image()->YSize()/(-zm); 288 } 289 if ((snx != sx) || (sny != sy)) 290 { 291 pimg->SetOffset(0, 0, false); 292 if (((PIContainer*)(pimg-Parent()))->NbChilds() == 1) 293 ((PIContainer*)(pimg-Parent()))->SetSize(snx, sny); 294 } 295 else pimg->SetOffset(0, 0); 296 297 } 298 break; 299 300 case 5201 : 301 mpii->ChangeAxesConfiguration(true, false, false); 302 break; 303 case 5202 : 304 mpii->ChangeAxesConfiguration(false, true, false); 305 break; 306 case 5203 : 307 mpii->ChangeAxesConfiguration(false, false, true); 308 break; 309 230 310 default: 231 311 // printf("PIImgLutWind::Process Msg %d received \n", (int)msg); … … 233 313 } 234 314 235 if (PIImage::CurrentPIImage() == NULL) return;236 315 237 316 CMapId cmap[10] = { CMAP_GREY32, CMAP_GREYINV32, CMAP_COLRJ32, … … 242 321 if ((msg <= 110) && (msg >= 90)) // Zoom 243 322 PIImage::CurrentPIImage()->SetZoom((int)(msg-100)); 244 else if ((msg > 200) && (msg < 2 06)) // Changement de couleur323 else if ((msg > 200) && (msg < 211)) // Changement de couleur 245 324 PIImage::CurrentPIImage()->SetColMap(cmap[msg-201]); 246 325 -
trunk/SophyaPI/PI/piwindowx.cc
r114 r117 112 112 { 113 113 pwm->SetSize(sx, sy); 114 PIWdgX::SetSize(sx, sy); 114 115 return; 115 116 } … … 119 120 { 120 121 pwm->SetPos(px, py); 122 PIWdgX::SetPos(px, py); 121 123 return; 122 124 }
Note:
See TracChangeset
for help on using the changeset viewer.