Changeset 2264 in Sophya for trunk/SophyaPI/PI/pieldrw.h
- Timestamp:
- Nov 15, 2002, 12:54:16 AM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/pieldrw.h
r2262 r2264 8 8 #include "pidrawer.h" 9 9 10 // Classe avec gestion d une liste d elements a tracer 10 /* ------------------- Classe PIElDrwMgr ------------------------ */ 11 // Classe avec gerant d une liste d elements a tracer 11 12 12 13 class PIElDrwMgr … … 17 18 PIDEL_Circ = 5, PIDEL_FCirc = 6, 18 19 PIDEL_Arc = 7, PIDEL_FArc = 8, 19 PIDEL_Poly = 9, PIDEL_FPoly = 10, 20 PIDEL_Mark = 11, PIDEL_Arrow = 12, 21 PIDEL_CText = 13 } ; 20 PIDEL_Arc3P = 9, PIDEL_FArc3P = 10, 21 PIDEL_Poly = 11, PIDEL_FPoly = 12, 22 PIDEL_Mark = 13, PIDEL_Arrow = 14, 23 PIDEL_CText = 15 } ; 22 24 23 25 PIElDrwMgr(); … … 88 90 // ---- Ajout de cercles 89 91 inline int ElAddCirc(double x, double y, double r, bool fgsc=false) 90 { PIGraphicAtt gatt; return( ElAdd(PIDEL_Circ, x, y, r, r, NULL, gatt, 0, fgsc) ); } 92 { PIGraphicAtt gatt; 93 return( ElAdd(PIDEL_Circ, x, y, 0., 360., NULL, gatt, 0, fgsc, r) ); } 91 94 inline int ElAddCirc(double x, double y, double r, 92 95 PIGraphicAtt const & gatt, bool fgsc=false) 93 { return( ElAdd(PIDEL_Circ, x, y, r, r, NULL, gatt, 0, fgsc) ); }96 { return( ElAdd(PIDEL_Circ, x, y, 0., 360., NULL, gatt, 0, fgsc, r) ); } 94 97 95 98 inline int ElAddFCirc(double x, double y, double r, bool fgsc=false) 96 { PIGraphicAtt gatt; return( ElAdd(PIDEL_FCirc, x, y, r, r, NULL, gatt, 0, fgsc) ); } 99 { PIGraphicAtt gatt; 100 return( ElAdd(PIDEL_FCirc, x, y, 0., 360., NULL, gatt, 0, fgsc, r) ); } 97 101 inline int ElAddFCirc(double x, double y, double r, 98 102 PIGraphicAtt const & gatt, bool fgsc=false) 99 { return( ElAdd(PIDEL_FCirc, x, y, r, r, NULL, gatt, 0, fgsc) ); } 100 101 // ---- Ajout d' arcs 103 { return( ElAdd(PIDEL_FCirc, x, y, 0., 360., NULL, gatt, 0, fgsc, r) ); } 104 105 // ---- Ajout d' arcs specifies par deux angles 106 inline int ElAddArc(double x, double y, double r, 107 double a, double da, bool fgsc=false) 108 { PIGraphicAtt gatt; 109 return( ElAdd(PIDEL_Arc, x, y, a, da, NULL, gatt, 0, fgsc, r) ); } 110 inline int ElAddArc(double x, double y, double r, double a, double da, 111 PIGraphicAtt const & gatt, bool fgsc=false) 112 { return( ElAdd(PIDEL_Arc, x, y, a, da, NULL, gatt, 0, fgsc, r) ); } 113 114 inline int ElAddFArc(double x, double y, double r, 115 double a, double da, bool fgsc=false) 116 { PIGraphicAtt gatt; 117 return( ElAdd(PIDEL_FArc, x, y, a, da, NULL, gatt, 0, fgsc, r) ); } 118 inline int ElAddFArc(double x, double y, double r, double a, double da, 119 PIGraphicAtt const & gatt, bool fgsc=false) 120 { return( ElAdd(PIDEL_FArc, x, y, a, da, NULL, gatt, 0, fgsc, r) ); } 121 122 // ---- Ajout d' arcs specifies par 3 points 102 123 inline int ElAddArc(double x1, double y1, double x2, double y2, 103 124 double x3, double y3, bool fgsc=false) … … 105 126 x[0] = x1; x[1] = x2; x[2] = x3; 106 127 y[0] = y1; y[1] = y2; y[2] = y3; 107 return( ElAdd(PIDEL_Arc , x, y, 3, gatt, fgsc) ); }128 return( ElAdd(PIDEL_Arc3P, x, y, 3, gatt, fgsc) ); } 108 129 109 130 inline int ElAddArc(double x1, double y1, double x2, double y2, … … 112 133 x[0] = x1; x[1] = x2; x[2] = x3; 113 134 y[0] = y1; y[1] = y2; y[2] = y3; 114 return( ElAdd(PIDEL_Arc , x, y, 3, gatt, fgsc) ); }135 return( ElAdd(PIDEL_Arc3P, x, y, 3, gatt, fgsc) ); } 115 136 116 137 inline int ElAddFArc(double x1, double y1, double x2, double y2, … … 119 140 x[0] = x1; x[1] = x2; x[2] = x3; 120 141 y[0] = y1; y[1] = y2; y[2] = y3; 121 return( ElAdd(PIDEL_FArc , x, y, 3, gatt, fgsc) ); }142 return( ElAdd(PIDEL_FArc3P, x, y, 3, gatt, fgsc) ); } 122 143 123 144 inline int ElAddFArc(double x1, double y1, double x2, double y2, … … 126 147 x[0] = x1; x[1] = x2; x[2] = x3; 127 148 y[0] = y1; y[1] = y2; y[2] = y3; 128 return( ElAdd(PIDEL_FArc , x, y, 3, gatt, fgsc) ); }149 return( ElAdd(PIDEL_FArc3P, x, y, 3, gatt, fgsc) ); } 129 150 130 151 // ---- Ajout de polygones … … 149 170 int ElAdd(int typ, double x, double y, double dx, double dy, 150 171 const char* s, PIGraphicAtt const & att, 151 unsigned long txtposdir, bool fgsc );172 unsigned long txtposdir, bool fgsc, double r=0.); 152 173 int ElAdd(double x, double y, const char* s, PIGraphicAtt const & att, 153 174 const char* s_up, const char* s_dn, PIGraphicAtt const * gass, … … 169 190 struct DrwEl{ 170 191 int eid, etyp; 171 double ex,ey ;192 double ex,ey,er; 172 193 double edx,edy; 173 194 PIGraphicAtt gatt; … … 176 197 PIGrCoord* ypol; 177 198 int npol; 178 bool scc; // true -> scale coordinate (user-coord : 0..1 1199 bool scc; // true -> normalized coordinates ( 0..1 ) 179 200 }; 180 201 … … 184 205 185 206 }; 207 208 /* ------------------- Classe PIElDrawer ------------------------ */ 209 // Classe de Drawer capable de gerer une liste d'elements a tracer 186 210 187 211 class PIElDrawer : public PIDrawer
Note:
See TracChangeset
for help on using the changeset viewer.