Changeset 349 in Sophya for trunk/SophyaPI/PIext/pistdimgapp.cc


Ignore:
Timestamp:
Aug 4, 1999, 3:37:31 PM (26 years ago)
Author:
ercodmgr
Message:

A/ ajout des blocs foreach et ameliorations gestion des variables ($x)
pour l'interpreteur piacmd.
B/ Ajout PIStdImgApp::AddText et corrections diverses

Reza 05/08/99

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pistdimgapp.cc

    r347 r349  
    533533}
    534534
     535/* --Methode-- */
     536void PIStdImgApp::AddText(string const & txt, double xp, double yp)
     537{
     538if (!mLastWdg)  return;
     539PIElDrawer *eld=NULL;
     540PIScDrawWdg* sdw=NULL;
     541PIDraw3DWdg* w3d=NULL;
     542PIImage* imgw;
     543switch(mLastWdg->kind()) {
     544  case PIScDrawWdg::ClassId :
     545    sdw = dynamic_cast<PIScDrawWdg *>(mLastWdg);
     546    if (sdw) eld = sdw->BaseDrawer();
     547    break;
     548  case PIDraw3DWdg::ClassId :
     549    w3d = dynamic_cast<PIDraw3DWdg *>(mLastWdg);
     550    if (w3d) eld = w3d->BaseDrawer();
     551    break;
     552  case PIImage::ClassId :
     553    imgw = dynamic_cast<PIImage *>(mLastWdg);
     554    if (imgw) eld = imgw->MyElDrawer();
     555    break;
     556  default :
     557    break;
     558  }
     559if (eld) {
     560  if ( (mFSz != PI_NotDefFontSize) && (mFAtt != PI_NotDefFontAtt) )     eld->SetFontAtt(mFSz, mFAtt);
     561  eld->ElAddText(xp,yp,txt.c_str(),mFCol);
     562  eld->Refresh();
     563  }
     564}
    535565
    536566/* --Methode-- */
Note: See TracChangeset for help on using the changeset viewer.