Changeset 141 in Sophya for trunk/SophyaPI


Ignore:
Timestamp:
Sep 2, 1998, 6:38:21 PM (27 years ago)
Author:
ercodmgr
Message:

Dashed-line et petite corrrection ds ApplX Reza 02/09/98

Location:
trunk/SophyaPI/PI
Files:
4 edited

Legend:

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

    r138 r141  
    141141
    142142// Pour appeler FinishCreate() des objets dans la fenetre principale
    143 MBCont()->FinishCreate();
     143if (mStop) MBCont()->FinishCreate();   // C'est la premiere fois
     144else mStop = true;   // On rerentre apres un stop
    144145while (mStop)
    145146  {
  • trunk/SophyaPI/PI/pidrwtools.cc

    r138 r141  
    198198mOpt[5]->AppendItem("Normal-Line", 602);
    199199mOpt[5]->AppendItem("Thick-Line", 603);
     200mOpt[5]->AppendItem("ThinDashed-Line", 604);
     201mOpt[5]->AppendItem("Dashed-Line", 605);
     202mOpt[5]->AppendItem("ThickDashed-Line", 606);
    200203mOpt[5]->SetValue(600);
    201204mOpt[5]->SetBinding(PIBK_elastic, PIBK_elastic, PIBK_elastic, PIBK_elastic);
     
    298301                     PI_TriangleMarker, PI_FTriangleMarker,
    299302                     PI_StarMarker, PI_FStarMarker };
    300 PILineAtt line[4] = { PI_NotDefLineAtt, PI_ThinLine, PI_NormalLine, PI_ThickLine};
     303PILineAtt line[7] = { PI_NotDefLineAtt, PI_ThinLine, PI_NormalLine, PI_ThickLine,
     304                                        PI_ThinDashedLine, PI_DashedLine, PI_ThickDashedLine};
    301305
    302306PIFontAtt fntatt[4] = { PI_NotDefFontAtt, PI_RomanFont, PI_BoldFont, PI_ItalicFont };
     
    354358    drw->SetFontAtt(fntsz[kk], fntatt[kkk]);
    355359    k =  mOpt[5]->GetValue()-600;
    356     if ( (k < 0) || (k > 3) )  k = 0;
     360    if ( (k < 0) || (k > 6) )  k = 0;
    357361    drw->SetLineAtt(line[k]);
    358362    if (msg == 2800) drw->Refresh();
  • trunk/SophyaPI/PI/pigraphgen.h

    r138 r141  
    2727
    2828enum PILineAtt { PI_NotDefLineAtt = -1,
    29                  PI_NormalLine = 0, PI_ThinLine = 1, PI_ThickLine = 2 };
     29                 PI_NormalLine = 0, PI_ThinLine = 1, PI_ThickLine = 2 ,
     30                 PI_DashedLine = 128, PI_ThinDashedLine = 129, PI_ThickDashedLine = 130 };
    3031
    3132enum PIMarker  { PI_NotDefMarker = -1,
  • trunk/SophyaPI/PI/pigraphx.cc

    r140 r141  
    395395void PIGraphicX::SelLine(PILineAtt att)
    396396{
    397 unsigned int lt;
     397unsigned int lt=0;
     398int lstyle=LineSolid;
    398399
    399400if (att == mLAtt)  return;
     
    403404  case PI_NormalLine :
    404405    lt = 2;
     406    lstyle = LineSolid;
    405407    break;
    406408  case PI_ThickLine :
    407409    lt = 4;
     410    lstyle = LineSolid;
    408411    break;
    409412  case  PI_ThinLine :
    410413    lt = 0;
    411     break;
     414    lstyle = LineSolid;
     415    break;
     416  case PI_DashedLine :
     417    lt = 2;
     418    lstyle = LineOnOffDash;
     419    break;
     420  case PI_ThickDashedLine :
     421    lt = 4;
     422    lstyle = LineOnOffDash;
     423    break;
     424  case  PI_ThinDashedLine :
     425    lt = 0;
     426    lstyle = LineOnOffDash;
     427    break;
     428
    412429  default:
    413430    lt = 0;
     431    lstyle=LineSolid;
    414432    break;
    415433  }
    416434   
    417 XSetLineAttributes(XtDisplay(MyWdg()), DefGC(), lt, LineSolid, CapButt, JoinMiter);
     435XSetLineAttributes(XtDisplay(MyWdg()), DefGC(), lt, lstyle, CapButt, JoinMiter);
    418436mLAtt = att;
    419437return;
Note: See TracChangeset for help on using the changeset viewer.