Changeset 2157 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Aug 4, 2002, 11:42:21 PM (23 years ago)
Author:
ansari
Message:

Ajout <Alt>+/- ou <Cntl>+/- pour zoom in/out ds PIImage , Reza 4/8/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PI/piimage.cc

    r2119 r2157  
    4747//      * <Alt>X : Active/désactive l'affichage des coupes X,Y
    4848//      * <Alt>Z : Supprime les textes et signes ajoutés au dessin.
     49//      * <Alt>+ <Cntl>+ : Augmentation du facteur de zoom
     50//      * <Alt>- <Cntl>- : Diminution du facteur de zoom
    4951//      * Touches Curseurs : déplace la pavé.
    5052//--
     
    687689{
    688690cur_piimage = this;
    689 if (kmod == PIKM_Alt) {
     691if (kmod & PIKM_Alt) {
    690692  if      (key == 'R' || key == 'r') Apply(true);  // Pour tout rafraichir 
    691693  else if (key == 'V' || key == 'v') RequestSelection();  // Pour coller (copier/coller) 
     
    703705    bool cut = (cutwin == NULL) ? true : false;
    704706    ShowCuts(cut);
     707    }
     708  else if (key == '+') {   // Zoom in (Augmentation du facteur de zoom)
     709    //    cout << " ++Changing zoom factor " << GetZoomF() << " ---> "
     710    //   << 2*GetZoomF() << endl;
     711    SetZoomF(GetZoomF()*2., true);
     712    }
     713  else if (key == '-') {   // Zoom out (diminution du facteur de zoom)
     714    //    cout << " --Changing zoom factor " << GetZoomF() << " ---> "
     715    //   << 0.5*GetZoomF() << endl;
     716    SetZoomF(GetZoomF()*0.5, true);
    705717    }
    706718// ----  Le copier ----
     
    730742    }
    731743  }
    732 
    733 
     744else if (kmod & PIKM_Cntl) {
     745  if (key == '+') {   // Zoom in (Augmentation du facteur de zoom)
     746    SetZoomF(GetZoomF()*2., true);
     747    }
     748  else if (key == '-') {   // Zoom out (diminution du facteur de zoom)
     749    SetZoomF(GetZoomF()*0.5, true);
     750    }
     751}
    734752else if (kmod == PIKM_Blank) {
    735753  switch (key) {
Note: See TracChangeset for help on using the changeset viewer.