Changeset 1905 in Sophya for trunk/SophyaPI/PIGcont/picntools.cc


Ignore:
Timestamp:
Feb 18, 2002, 11:41:28 PM (24 years ago)
Author:
ansari
Message:

Adaptation a l'introduction de la classe PIGraphicAtt - Reza 18/02/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIGcont/picntools.cc

    r1857 r1905  
    313313mOpt[7]->AppendItem("Small FontSz", 802);
    314314mOpt[7]->AppendItem("Normal FontSz", 803);
    315 mOpt[7]->AppendItem("Big FontSz", 804);
     315mOpt[7]->AppendItem("Large FontSz", 804);
    316316mOpt[7]->AppendItem("Huge FontSz", 805);
    317317mOpt[7]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
     
    441441                               PI_ItalicFont, PI_BoldItalicFont };
    442442static PIFontSize fntsz[6] = { PI_NotDefFontSize, PI_TinySizeFont, PI_SmallSizeFont,
    443                                PI_NormalSizeFont, PI_BigSizeFont, PI_HugeSizeFont };
     443                               PI_NormalSizeFont, PI_LargeSizeFont, PI_HugeSizeFont };
    444444
    445445/* --Methode-- */
     
    487487
    488488int ii,jj,kk;
    489 PIColors fc = dr->GetFgColAtt();
     489PIColors fc = dr->GetGraphicAtt().GetFgColor();
    490490for(kk=0; kk<MYNMXCOLORS; kk++)
    491491  if (fc == cols[kk])  { mOpt[0]->SetValue(100+kk);  break; }   
    492 CMapId cmi = dr->GetColMapId();
     492CMapId cmi = dr->GetGraphicAtt().GetColMapId();
    493493if (cmi == CMAP_OTHER)  mOpt[1]->SetValue(200);
    494494else for(kk=0; kk<PIColorMap::NumberStandardColorMaps(); kk++)
    495495  if (cmi == PIColorMap::GetStandardColorMapId(kk)) { mOpt[1]->SetValue(201+kk);  break; } 
    496 PIMarker mk = dr->GetMarker();   
     496PIMarker mk = dr->GetGraphicAtt().GetMarker();   
    497497for(kk=0; kk<12; kk++)
    498498  if (mk == mrk[kk])   { mOpt[2]->SetValue(300+kk);  break; }
    499 kk = dr->GetMarkerSz();
     499kk = dr->GetGraphicAtt().GetMarkerSz();
    500500if (kk < 1)  kk = 1;
    501501if (kk > 15) kk = 15;
    502502if (kk%2 == 0) kk++;
    503503mOpt[3]->SetValue(400+kk);
    504 PIFontName fnm = dr->GetFontName();
    505 PIFontAtt fat = dr->GetFontAtt();
    506 PIFontSize fsz = dr->GetFontSz();
     504PIFontName fnm = dr->GetGraphicAtt().GetFontName();
     505PIFontAtt fat = dr->GetGraphicAtt().GetFontAtt();
     506PIFontSize fsz = dr->GetGraphicAtt().GetFontSz();
    507507for(ii=0; ii<5; ii++)
    508508  if (fnm ==  fntname[ii]) break;
     
    519519mOpt[7]->SetValue(800+jj);
    520520
    521 PILineAtt lat = dr->GetLineAtt();
     521PILineAtt lat = dr->GetGraphicAtt().GetLineAtt();
    522522for(kk=0; kk<10; kk++)
    523523  if (lat == line[kk])   { mOpt[5]->SetValue(600+kk);  break; }
     
    635635  k = mOpt[0]->GetValue()-100; // -> COULEUR
    636636  if ( (k < 0) || (k >= MYNMXCOLORS) )  k = 0;
    637   mCurCDrw->SetColAtt(cols[k]);
     637  mCurCDrw->GetGraphicAtt().SetColAtt(cols[k]);
    638638  double zmin=0;
    639639  double zmax=1.;
     
    645645  k = mOpt[1]->GetValue()-200; // --> COLOR MAP
    646646  if (k == 0){
    647     mCurCDrw->SetColMapId(CMAP_OTHER);
     647    mCurCDrw->GetGraphicAtt().SetColMapId(CMAP_OTHER);
    648648   
    649649  }else{
    650     mCurCDrw->SetColMapId(PIColorMap::GetStandardColorMapId(k-1));
     650    mCurCDrw->GetGraphicAtt().SetColMapId(PIColorMap::GetStandardColorMapId(k-1));
    651651    cmapv->SetColMapId(PIColorMap::GetStandardColorMapId(k-1),false, zmin , zmax,true);
    652652  }
     
    655655  kk =  mOpt[3]->GetValue()-400; // marker SIZE
    656656  if ( (kk < 1) || (kk > 27) )  kk = 1;
    657   mCurCDrw->SetMarkerAtt(kk, mrk[k]);
     657  mCurCDrw->GetGraphicAtt().SetMarkerAtt(kk, mrk[k]);
    658658
    659659  ii =  (mOpt[4]->GetValue()-500);
    660660  jj =  (mOpt[6]->GetValue()-700);
    661661  kk =  (mOpt[7]->GetValue()-800);
    662   mCurCDrw->SetFont(fntname[ii], fntsz[kk], fntatt[jj]);
     662  mCurCDrw->GetGraphicAtt().SetFontAtt(fntname[ii], fntsz[kk], fntatt[jj]);
    663663
    664664  k =  mOpt[5]->GetValue()-600;
    665665  if ( (k < 0) || (k > 9) )  k = 0;
    666   mCurCDrw->SetLineAtt(line[k]);
     666  mCurCDrw->GetGraphicAtt().SetLineAtt(line[k]);
    667667
    668668  if (refr)
Note: See TracChangeset for help on using the changeset viewer.