Changeset 1898 in Sophya
- Timestamp:
- Feb 12, 2002, 4:15:48 PM (24 years ago)
- Location:
- trunk/SophyaPI/PI
- Files:
-
- 11 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Tests/pist.cc
r1896 r1898 48 48 int sx=10, int sy=10, int px=0, int py=0); 49 49 virtual ~StringPosDrawWdg(); 50 inline void SetTextDirection(PIGrTextDirection txtdir) { mTxtDir = txtdir; } 50 51 51 52 // Traitement des evenements … … 54 55 55 56 protected: 57 PIGrTextDirection mTxtDir; 56 58 }; 57 59 … … 65 67 int sx=10, int sy=10, int px=0, int py=0); 66 68 virtual ~CompStringDrawWdg(); 67 68 69 // Traitement des evenements 69 70 // virtual void Resize(); … … 274 275 275 276 { 277 mTxtDir = PI_TextDirectionHorizontal; 276 278 } 277 279 … … 331 333 char * s1; 332 334 335 if (mTxtDir != PI_TextDirectionHorizontal) { 336 xpos = 50; ypos = 350; 337 s1 = "V_Top-H_Left-TxDUp"; 338 g->SelForeground(PI_Red); 339 g->DrawLine(xpos-10, ypos, xpos+10, ypos); 340 g->DrawLine(xpos, ypos-50, xpos, ypos+50); 341 g->SelForeground(PI_Black); 342 g->DrawString(xpos, ypos, s1, 343 PI_HorizontalLeft|PI_VerticalTop|PI_TextDirectionVerticalUp); 344 345 xpos = 100; ypos = 300; 346 s1 = "V_Top-H_Center-TxDUp"; 347 g->SelForeground(PI_Red); 348 g->DrawLine(xpos-10, ypos, xpos+10, ypos); 349 g->DrawLine(xpos, ypos-50, xpos, ypos+50); 350 g->SelForeground(PI_Black); 351 g->DrawString(xpos, ypos, s1, 352 PI_HorizontalCenter|PI_VerticalTop|PI_TextDirectionVerticalUp); 353 354 xpos = 150; ypos = 250; 355 s1 = "V_Top-H_Right-TxDUp"; 356 g->SelForeground(PI_Red); 357 g->DrawLine(xpos-10, ypos, xpos+10, ypos); 358 g->DrawLine(xpos, ypos-50, xpos, ypos+50); 359 g->SelForeground(PI_Black); 360 g->DrawString(xpos, ypos, s1, 361 PI_HorizontalRight|PI_VerticalTop|PI_TextDirectionVerticalUp); 362 363 xpos = 200; ypos = 50; 364 s1 = "V_Top-H_Left-TxDown"; 365 g->SelForeground(PI_Red); 366 g->DrawLine(xpos-10, ypos, xpos+10, ypos); 367 g->DrawLine(xpos, ypos-50, xpos, ypos+50); 368 g->SelForeground(PI_Black); 369 g->DrawString(xpos, ypos, s1, 370 PI_HorizontalLeft|PI_VerticalTop|PI_TextDirectionVerticalDown); 371 372 xpos = 250; ypos = 100; 373 s1 = "V_Top-H_Center-TxDown"; 374 g->SelForeground(PI_Red); 375 g->DrawLine(xpos-10, ypos, xpos+10, ypos); 376 g->DrawLine(xpos, ypos-50, xpos, ypos+50); 377 g->SelForeground(PI_Black); 378 g->DrawString(xpos, ypos, s1, 379 PI_HorizontalCenter|PI_VerticalTop|PI_TextDirectionVerticalDown); 380 381 xpos = 300; ypos = 150; 382 s1 = "V_Top-H_Right-TxDown"; 383 g->SelForeground(PI_Red); 384 g->DrawLine(xpos-10, ypos, xpos+10, ypos); 385 g->DrawLine(xpos, ypos-50, xpos, ypos+50); 386 g->SelForeground(PI_Black); 387 g->DrawString(xpos, ypos, s1, 388 PI_HorizontalRight|PI_VerticalTop|PI_TextDirectionVerticalDown); 389 390 return; 391 } 333 392 // --------------- Vertical Top ----------------- 334 393 … … 350 409 351 410 xpos = XSize()-30; ypos = 75; 352 s1 = "V_Top-H_ Center";411 s1 = "V_Top-H_Right"; 353 412 g->SelForeground(PI_Red); 354 413 g->DrawLine(xpos-50, ypos, xpos+50, ypos); … … 663 722 m[0]->AppendItem("StringPosDrawWdg", 10102); 664 723 m[0]->AppendItem("CompStringDrawWdg", 10103); 724 m[0]->AppendItem("StringPosVertical", 10104); 725 665 726 m[0]->AppendItem("->eps", 10111); 666 727 m[0]->AppendItem("->ps", 10112); … … 751 812 wp->SetAutoDelChilds(true); 752 813 CompStringDrawWdg* exb = new CompStringDrawWdg(wp, "compposdrawwdg", 600, 400, 0, 0); 814 exb->SetBinding(PIBK_fixed,PIBK_elastic,PIBK_elastic,PIBK_elastic); 815 wp->SetUserData(exb); 816 wp->Show(); 817 } 818 break; 819 820 case 10104: // Creation d'un StringPosDrawWdg-VerticalStringDir 821 { 822 nbwin++; 823 sprintf(strg, "Creation StringPosDrawWdg-Vertical \n Fenetre No %d ", nbwin); 824 sprintf(strg,"StringPosDrawWdg-Vertical - %d", nbwin); 825 PIWindow* wp = new PIWindow(this, strg, PIWK_normal, 400, 600, 150, 150); 826 wp->SetAutoDelChilds(true); 827 StringPosDrawWdg* exb = new StringPosDrawWdg(wp, "sposdrawwdgvert", 400, 600, 0, 0); 828 exb->SetTextDirection(PI_TextDirectionVerticalUp); 753 829 exb->SetBinding(PIBK_fixed,PIBK_elastic,PIBK_elastic,PIBK_elastic); 754 830 wp->SetUserData(exb); -
trunk/SophyaPI/PI/pigraphgen.cc
r1897 r1898 172 172 //-- 173 173 //++ 174 // void DrawString(PIGrCoord x, PIGrCoord y, const char* s, intpos = 0)174 // void DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0) 175 175 // Trace la chaîne de caractères "s" à la position "x,y", 176 176 // en utilisant la couleur d'avant-plan (Foreground) … … 194 194 void 195 195 PIGraphicGen::DrawCompString(PIGrCoord x, PIGrCoord y, const char* s, 196 const char* s_up, const char* s_dn, intpos)196 const char* s_up, const char* s_dn, unsigned long pos) 197 197 { 198 198 if ((s_up == NULL) && (s_dn == NULL)) { … … 567 567 568 568 /* --Methode-- */ 569 bool PIGraphicGen::CalcStringPositionShift(char const* s, intpos,569 bool PIGraphicGen::CalcStringPositionShift(char const* s, unsigned long pos, 570 570 int& dx, int& dy) 571 571 { -
trunk/SophyaPI/PI/pigraphgen.h
r1893 r1898 51 51 PI_VerticalCenter = 0x30, PI_VerticalTop = 0x40, 52 52 PI_VerticalPosition = 0xF0 }; 53 54 // Orientation de trace de chaines 55 enum PIGrTextDirection 56 { PI_TextDirectionHorizontal = 0, 57 PI_TextDirectionVerticalUp = 0x100, 58 PI_TextDirectionVerticalDown = 0x200, 59 PI_TextDirection = 0xF00}; 53 60 54 61 // Les differents modes de trace graphique disponible … … 154 161 virtual void Erase(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy) = 0; 155 162 156 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, int pos = 0)= 0;157 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, int pos = 0)= 0;163 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0) = 0; 164 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0) = 0; 158 165 virtual void DrawCompString(PIGrCoord x, PIGrCoord y, const char* s, 159 const char* s_up, const char* s_dn, intpos = 0);166 const char* s_up, const char* s_dn, unsigned long pos = 0); 160 167 161 168 virtual void DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2) = 0; … … 217 224 virtual PIGrCoord GetFontHeight(PIGrCoord& asc, PIGrCoord& desc); 218 225 virtual PIGrCoord CalcStringWidth(char const* s); 219 virtual bool CalcStringPositionShift(char const* s, intpos,226 virtual bool CalcStringPositionShift(char const* s, unsigned long pos, 220 227 int& dx, int& dy); 221 228 -
trunk/SophyaPI/PI/pigraphps.cc
r1890 r1898 112 112 113 113 /* --Methode-- */ 114 void PIGraphicPS::DrawString(PIGrCoord x, PIGrCoord y, const char* s, intpos)114 void PIGraphicPS::DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos) 115 115 { 116 116 if(mPSOut) { … … 128 128 129 129 /* --Methode-- */ 130 void PIGraphicPS::DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, intpos)130 void PIGraphicPS::DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos) 131 131 { 132 132 if(mPSOut) { -
trunk/SophyaPI/PI/pigraphps.h
r1890 r1898 21 21 // Trace graphiques 22 22 virtual void Erase(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy); 23 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, intpos = 0);24 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, intpos = 0);23 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0); 24 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0); 25 25 virtual void DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2); 26 26 virtual void DrawBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy); -
trunk/SophyaPI/PI/pigraphuc.cc
r1890 r1898 392 392 393 393 /* --Methode-- */ 394 void PIGraphicUC::DrawString(PIGrCoord x, PIGrCoord y, const char* s, intpos)394 void PIGraphicUC::DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos) 395 395 { 396 396 if (!mGrC) return; … … 401 401 402 402 /* --Methode-- */ 403 void PIGraphicUC::DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, intpos)403 void PIGraphicUC::DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos) 404 404 { 405 405 if (!mGrC) return; … … 411 411 /* --Methode-- */ 412 412 void PIGraphicUC::DrawCompString(PIGrCoord x, PIGrCoord y, const char* s, 413 const char* s_up, const char* s_dn, intpos)413 const char* s_up, const char* s_dn, unsigned long pos) 414 414 { 415 415 if (!mGrC) return; -
trunk/SophyaPI/PI/pigraphuc.h
r1890 r1898 43 43 // Trace graphiques 44 44 virtual void Erase(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy); 45 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, intpos = 0);46 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, intpos = 0);45 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0); 46 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0); 47 47 virtual void DrawCompString(PIGrCoord x, PIGrCoord y, const char* s, 48 const char* s_up, const char* s_dn, intpos = 0);48 const char* s_up, const char* s_dn, unsigned long pos = 0); 49 49 virtual void DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2); 50 50 virtual void DrawBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy); -
trunk/SophyaPI/PI/pigraphx.cc
r1897 r1898 8 8 #include <X11/Intrinsic.h> 9 9 #include <X11/StringDefs.h> 10 #include <X11/Xutil.h> 10 11 11 12 #include "pigraphx.h" … … 108 109 109 110 /* --Methode-- */ 110 void PIGraphicX::DrawString(PIGrCoord x, PIGrCoord y, const char* s, intpos)111 void PIGraphicX::DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos) 111 112 { 112 113 int dx, dy, xi, yi; 113 114 xi = x; yi = y; 114 if (CalcStringPositionShift(s, pos, dx, dy)) { 115 xi -= dx; yi -= dy; } 116 XDrawString (XtDisplay (MyWdg()),mWId, 117 DefGC(), xi, yi, s, strlen(s)); 118 return; 119 } 120 121 /* --Methode-- */ 122 void PIGraphicX::DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, int pos) 115 bool fgcsps = CalcStringPositionShift(s, pos, dx, dy); 116 unsigned long txtdir = pos&PI_TextDirection; 117 if (txtdir == PI_TextDirectionHorizontal) { 118 if (fgcsps) { xi -= dx; yi -= dy; } 119 XDrawString (mDisp, mWId, DefGC(), xi, yi, s, strlen(s)); 120 } 121 else { 122 if (txtdir == PI_TextDirectionVerticalDown) { xi += dy; yi -= dx; } 123 else { xi -= dy; yi += dx; } 124 DrawVerticalString(xi, yi, s, txtdir, false); 125 } 126 return; 127 } 128 129 /* --Methode-- */ 130 void PIGraphicX::DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos) 123 131 { 124 132 int dx, dy, xi, yi; 125 133 xi = x; yi = y; 126 if (CalcStringPositionShift(s, pos, dx, dy)) { 127 xi -= dx; yi -= dy; } 128 XDrawImageString (XtDisplay (MyWdg()),mWId, 129 DefGC(), xi, yi, s, strlen(s)); 134 bool fgcsps = CalcStringPositionShift(s, pos, dx, dy); 135 unsigned long txtdir = pos&PI_TextDirection; 136 if (txtdir == PI_TextDirectionHorizontal) { 137 if (fgcsps) { xi -= dx; yi -= dy; } 138 XDrawImageString (mDisp, mWId, DefGC(), xi, yi, s, strlen(s)); 139 } 140 else { 141 if (txtdir == PI_TextDirectionVerticalDown) { xi += dy; yi -= dx; } 142 else { xi -= dy; yi += dx; } 143 DrawVerticalString(xi, yi, s, txtdir, true); 144 } 130 145 return; 131 146 } … … 135 150 void PIGraphicX::DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2) 136 151 { 137 XDrawLine( XtDisplay (MyWdg()), mWId, DefGC(), (int)x1, (int)y1, (int)x2, (int)y2);152 XDrawLine(mDisp, mWId, DefGC(), (int)x1, (int)y1, (int)x2, (int)y2); 138 153 return; 139 154 } … … 149 164 if (idx < 0) { ix0 += idx; idx = -idx; } 150 165 if (idy < 0) { iy0 += idy; idy = -idy; } 151 XDrawRectangle( XtDisplay (MyWdg()), mWId,166 XDrawRectangle(mDisp, mWId, 152 167 DefGC(), ix0, iy0, idx, idy); 153 168 return; … … 163 178 if (idx < 0) { ix0 += idx; idx = -idx; } 164 179 if (idy < 0) { iy0 += idy; idy = -idy; } 165 XFillRectangle( XtDisplay (MyWdg()), mWId,180 XFillRectangle(mDisp, mWId, 166 181 DefGC(), ix0, iy0, idx, idy); 167 182 return; … … 171 186 void PIGraphicX::DrawCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r) 172 187 { 173 XDrawArc( XtDisplay (MyWdg()), mWId, DefGC(),188 XDrawArc(mDisp, mWId, DefGC(), 174 189 (int)x0-(int)r, (int)y0-(int)r, 2*(int)r, 2*(int)r, 0, 360*64); 175 190 return; … … 179 194 void PIGraphicX::DrawFCircle(PIGrCoord x0, PIGrCoord y0, PIGrCoord r) 180 195 { 181 XFillArc( XtDisplay (MyWdg()), mWId, DefGC(),196 XFillArc(mDisp, mWId, DefGC(), 182 197 (int)x0-(int)r, (int)y0-(int)r, 2*(int)r, 2*(int)r, 0, 360*64); 183 198 return; … … 187 202 void PIGraphicX::DrawOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy) 188 203 { 189 XDrawArc( XtDisplay (MyWdg()), mWId, DefGC(),204 XDrawArc(mDisp, mWId, DefGC(), 190 205 (int)x0, (int)y0, (int)dx, (int)dy, 0, 360*64); 191 206 return; … … 195 210 void PIGraphicX::DrawFOval(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy) 196 211 { 197 XFillArc( XtDisplay (MyWdg()), mWId, DefGC(),212 XFillArc(mDisp, mWId, DefGC(), 198 213 (int)x0, (int)y0, (int)dx, (int)dy, 0, 360*64); 199 214 return; … … 236 251 int mode = CoordModeOrigin; 237 252 if (cinc) mode = CoordModePrevious; 238 XFillPolygon( XtDisplay (MyWdg()), mWId, DefGC(), pxp, n,253 XFillPolygon(mDisp, mWId, DefGC(), pxp, n, 239 254 Complex, mode); 240 255 if (n > NMXXPOINTS) delete[] pxp; … … 248 263 double degdeb, double degfin) 249 264 { 250 XDrawArc( XtDisplay (MyWdg()), mWId, DefGC(),265 XDrawArc(mDisp, mWId, DefGC(), 251 266 (int)x0, (int)y0, (int)dx, (int)dy, (int)(degdeb*64.), (int)(degfin*64.)); 252 267 return; … … 257 272 double degdeb, double degfin) 258 273 { 259 XFillArc( XtDisplay (MyWdg()), mWId, DefGC(),274 XFillArc(mDisp, mWId, DefGC(), 260 275 (int)x0, (int)y0, (int)dx, (int)dy, (int)(degdeb*64.), (int)(degfin*64.)); 261 276 return; … … 284 299 x1 = (float)x0-hmsz; y1 = y0; 285 300 x2 = (float)x0+dmsz; y2 = y1; 286 XDrawLine( XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, x2, y2);301 XDrawLine(mDisp, mWId, mMrkGC, x1, y1, x2, y2); 287 302 x1 = x0; y1 = (float)y0-hmsz; 288 303 x2 = x1; y2 = (float)y0+dmsz; 289 XDrawLine( XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, x2, y2);304 XDrawLine(mDisp, mWId, mMrkGC, x1, y1, x2, y2); 290 305 break; 291 306 case PI_CrossMarker : 292 307 x1 = (float)x0-hmsz; y1 = (float)y0-hmsz; 293 308 x2 = (float)x0+dmsz; y2 = (float)y0+dmsz; 294 XDrawLine( XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, x2, y2);295 XDrawLine( XtDisplay (MyWdg()), mWId, mMrkGC, x1, y2, x2, y1);309 XDrawLine(mDisp, mWId, mMrkGC, x1, y1, x2, y2); 310 XDrawLine(mDisp, mWId, mMrkGC, x1, y2, x2, y1); 296 311 break; 297 312 case PI_CircleMarker : … … 300 315 x1 = (int)x0-r; y1 = (int)y0-r; 301 316 if (mMrk == PI_CircleMarker) 302 XDrawArc( XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, 2*r, 2*r, 0, 360*64);303 else XFillArc( XtDisplay (MyWdg()), mWId, mMrkGC, x1, y1, 2*r, 2*r, 0, 360*64);317 XDrawArc(mDisp, mWId, mMrkGC, x1, y1, 2*r, 2*r, 0, 360*64); 318 else XFillArc(mDisp, mWId, mMrkGC, x1, y1, 2*r, 2*r, 0, 360*64); 304 319 break; 305 320 case PI_BoxMarker : … … 432 447 int mode = CoordModeOrigin; 433 448 if (cinc) mode = CoordModePrevious; 434 XFillPolygon( XtDisplay (MyWdg()), mWId, mMrkGC, pxp, n,449 XFillPolygon(mDisp, mWId, mMrkGC, pxp, n, 435 450 Complex, mode); 436 451 return; … … 438 453 439 454 455 /* --Methode-- */ 456 void PIGraphicX::DrawVerticalString(int x, int y, const char* s, unsigned long pos, bool imgs) 457 { 458 int fh, fasc, fdes; 459 fh = GetFont().GetFontHeight(fasc, fdes); 460 int sw = GetFont().GetStringWidth(s); 461 462 Display * dsx = mDisp; 463 Window rw = DefaultRootWindow(dsx); 464 Pixmap pxm = XCreatePixmap(dsx, rw, sw, fh, 1 ); 465 466 XGCValues xgv; 467 xgv.function = GXcopy; 468 xgv.plane_mask = ~0; 469 GC gcbm = XCreateGC (dsx, pxm, GCFunction | GCPlaneMask, &xgv); 470 XSetForeground(dsx, gcbm, ~0); 471 XSetBackground(dsx, gcbm, 0); 472 XSetFont(mDisp, gcbm, myFont.GetXFontId()); 473 474 XDrawImageString (dsx, pxm, gcbm, 0, fasc, s, strlen(s)); 475 XImage* ximg = XGetImage(dsx, pxm, 0, 0, sw, fh, 0xFFFFFFFF, ZPixmap); 476 477 Pixmap pxm2 = XCreatePixmap(dsx, rw, fh, sw, 1 ); 478 XImage* ximg2 = XGetImage(dsx, pxm2, 0, 0, fh, sw, 0xFFFFFFFF, ZPixmap); 479 // On recopie de ximg -> ximg2 en echangeant x,y 480 int i,j; 481 bool fgdown = ((pos&PI_TextDirection) == PI_TextDirectionVerticalDown); 482 if (fgdown) { 483 for(i=0; i<sw; i++) 484 for(j=0; j<fh; j++) 485 XPutPixel(ximg2, fh-j-1, i, XGetPixel(ximg, i, j)); 486 } 487 else { 488 for(i=0; i<sw; i++) 489 for(j=0; j<fh; j++) 490 XPutPixel(ximg2, j, sw-i-1, XGetPixel(ximg, i, j)); 491 } 492 XPutImage(dsx, pxm2, gcbm, ximg2, 0, 0, 0, 0, fh, sw); 493 GC gcvs = XCreateGC (dsx, mWId, GCFunction | GCPlaneMask, &xgv); 494 XCopyGC(dsx, DefGC(), ~0, gcvs); 495 XSetStipple(dsx, gcvs, pxm2); 496 XSetFillStyle(dsx, gcvs, FillStippled); 497 if (fgdown) { 498 XSetTSOrigin(dsx, gcvs, x, y); 499 XFillRectangle(dsx, mWId, gcvs, x, y, fh, sw); 500 } 501 else { 502 XSetTSOrigin(dsx, gcvs, x-fh, y-sw); 503 XFillRectangle(dsx, mWId, gcvs, x-fh, y-sw, fh, sw); 504 } 505 // Cleaning 506 XDestroyImage(ximg); 507 XDestroyImage(ximg2); 508 XFreeGC(dsx, gcvs); 509 XFreeGC(dsx, gcbm); 510 XFreePixmap(dsx, pxm); 511 XFreePixmap(dsx, pxm2); 512 513 } 440 514 441 515 -
trunk/SophyaPI/PI/pigraphx.h
r1897 r1898 21 21 // Trace graphiques 22 22 virtual void Erase(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy); 23 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, intpos = 0);24 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, intpos = 0);23 virtual void DrawString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0); 24 virtual void DrawOpaqueString(PIGrCoord x, PIGrCoord y, const char* s, unsigned long pos = 0); 25 25 virtual void DrawLine(PIGrCoord x1, PIGrCoord y1, PIGrCoord x2, PIGrCoord y2); 26 26 virtual void DrawBox(PIGrCoord x0, PIGrCoord y0, PIGrCoord dx, PIGrCoord dy); … … 94 94 void MrkDrawPolygon(XPoint* pxp, int n, bool cinc); 95 95 void MrkDrawFPolygon(XPoint* pxp, int n, bool cinc); 96 void DrawVerticalString(int x, int y, const char* s, unsigned long pos, bool imgs=false); 96 97 97 98 // Structure et identificateur XWindow associe -
trunk/SophyaPI/PI/psfile.cc
r1893 r1898 877 877 PIFontAtt FontAtt, 878 878 int FontSize, 879 intpos) {879 unsigned long pos) { 880 880 bool change = false; 881 881 -
trunk/SophyaPI/PI/psfile.h
r1887 r1898 116 116 PIFontAtt FontAtt = PI_NotDefFontAtt, 117 117 int FontSize = 8, 118 intpos = 0);118 unsigned long pos = 0); 119 119 virtual void DrawLine (double x1, double y1, double x2, double y2, 120 120 PIColors DrawColor = PI_NotDefColor,
Note:
See TracChangeset
for help on using the changeset viewer.