home *** CD-ROM | disk | FTP | other *** search
/ Enter 1998 December / ENTER12_1.iso / Dema / Cad_Proj.ekt / Mega48t / CC / COL.C_ / COL.C
Encoding:
C/C++ Source or Header  |  1997-11-06  |  1021 b   |  33 lines

  1. /**********************************************************************/
  2. #include "std.h"
  3. #include "megatyp.h"
  4. #include "megacad.h"
  5. /**********************************************************************/
  6. short main(
  7.         char *filename,
  8.         char *args )
  9. {
  10.     t_entity  ent;
  11.     double    pnt[2]; // Platz für den angeklickten Punkt
  12.     t_attribs *attr;
  13.  
  14.     // Funktionsname und Maushilfe setzen
  15.     SetFuncText("Farbe invertieren");
  16.     MouseHelp("Linie anklicken","zurück",HLP_INV(0,0,0));
  17.  
  18.     // Element anklicken, wobei hier nur Linien zulässig sind
  19.     // hier können auch gesperrte Elemente verändert werden
  20.     while ( ClickEntity(1<<E_LINE,pnt,&ent,NULL,0,TRUE) )
  21.     {
  22.         // Attribute des Elementes ändern
  23.         attr = &ent.attr;
  24.         ent.attr.col ^= 0xf;
  25.         ent.attr.col++;
  26.         // Element neu speichern
  27.         ExChangeEntity(&ent);
  28.         savecount();
  29.     }
  30.     return(0);
  31. }
  32. /**********************************************************************/
  33.