Changeset 1854 in Sophya
- Timestamp:
- Jan 12, 2002, 1:40:15 AM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaPI/PI/Tests/pist.cc
r1851 r1854 301 301 g->DrawString(2*XSize()/3,24,fszstr[js]); 302 302 303 304 PIFont fx(14,fn[2]); 305 fx.SetFontSz(mFSize); 306 fx.SetFontAtt(mFAtt); 307 g->SelFont(fx); 303 308 int fh,fa,fd; 304 fh = f .GetFontHeight(fa, fd);309 fh = fx.GetFontHeight(fa, fd); 305 310 cout << " FontSize= " << f.GetFontSize() << " FontHeight= " << fh << endl; 306 307 311 308 312 … … 320 324 g->DrawString(xpos, ypos, s1, PI_HorizontalLeft|PI_VerticalTop); 321 325 322 xpos = 250; ypos = 75;326 xpos = XSize()/2; ypos = 75; 323 327 s1 = "V_Top-H_Center"; 324 328 g->SelForeground(PI_Red); … … 328 332 g->DrawString(xpos, ypos, s1, PI_HorizontalCenter|PI_VerticalTop); 329 333 330 xpos = 470; ypos = 75;334 xpos = XSize()-30; ypos = 75; 331 335 s1 = "V_Top-H_Center"; 332 336 g->SelForeground(PI_Red); … … 345 349 g->DrawString(xpos, ypos, s1, PI_HorizontalLeft|PI_VerticalCenter); 346 350 347 xpos = 250; ypos = 150;351 xpos = XSize()/2; ypos = 150; 348 352 s1 = "V_Center-H_Center"; 349 353 g->SelForeground(PI_Red); … … 353 357 g->DrawString(xpos, ypos, s1, PI_HorizontalCenter|PI_VerticalCenter); 354 358 355 xpos = 470; ypos = 150;359 xpos = XSize()-30; ypos = 150; 356 360 s1 = "V_Center-H_Right"; 357 361 g->SelForeground(PI_Red); … … 361 365 g->DrawString(xpos, ypos, s1, PI_HorizontalRight|PI_VerticalCenter); 362 366 363 // --------------- Vertical B ottom-----------------367 // --------------- Vertical BaseLine ----------------- 364 368 xpos = 30; ypos = 250; 365 369 s1 = "V_Bottom-H_Left"; … … 368 372 g->DrawLine(xpos, ypos-10, xpos, ypos+10); 369 373 g->SelForeground(PI_Black); 374 g->DrawString(xpos, ypos, s1, PI_HorizontalLeft|PI_VerticalBaseLine); 375 376 xpos = XSize()/2; ypos = 250; 377 s1 = "V_Bottom-H_Center"; 378 g->SelForeground(PI_Red); 379 g->DrawLine(xpos-50, ypos, xpos+50, ypos); 380 g->DrawLine(xpos, ypos-10, xpos, ypos+10); 381 g->SelForeground(PI_Black); 382 g->DrawString(xpos, ypos, s1, PI_HorizontalCenter|PI_VerticalBaseLine); 383 384 xpos = XSize()-30; ypos = 250; 385 s1 = "V_Bottom-H_Center"; 386 g->SelForeground(PI_Red); 387 g->DrawLine(xpos-50, ypos, xpos+50, ypos); 388 g->DrawLine(xpos, ypos-10, xpos, ypos+10); 389 g->SelForeground(PI_Black); 390 g->DrawString(xpos, ypos, s1, PI_HorizontalRight|PI_VerticalBaseLine); 391 392 // --------------- Vertical Bottom ----------------- 393 xpos = 30; ypos = 325; 394 s1 = "V_Bottom-H_Left"; 395 g->SelForeground(PI_Red); 396 g->DrawLine(xpos-50, ypos, xpos+50, ypos); 397 g->DrawLine(xpos, ypos-10, xpos, ypos+10); 398 g->SelForeground(PI_Black); 370 399 g->DrawString(xpos, ypos, s1, PI_HorizontalLeft|PI_VerticalBottom); 371 400 372 xpos = 250; ypos = 250;401 xpos = XSize()/2; ypos = 325; 373 402 s1 = "V_Bottom-H_Center"; 374 403 g->SelForeground(PI_Red); … … 378 407 g->DrawString(xpos, ypos, s1, PI_HorizontalCenter|PI_VerticalBottom); 379 408 380 xpos = 470; ypos = 250;409 xpos = XSize()-30; ypos = 325; 381 410 s1 = "V_Bottom-H_Center"; 382 411 g->SelForeground(PI_Red); … … 489 518 sprintf(strg, "Creation StringPosDrawWdg \n Fenetre No %d ", nbwin); 490 519 sprintf(strg,"StringPosDrawWdg - %d", nbwin); 491 PIWindow* wp = new PIWindow(this, strg, PIWK_normal, 500, 300, 150, 150);520 PIWindow* wp = new PIWindow(this, strg, PIWK_normal, 600, 400, 150, 150); 492 521 wp->SetAutoDelChilds(true); 493 StringPosDrawWdg* exb = new StringPosDrawWdg(wp, "sposdrawwdg", 500, 300, 0, 0);522 StringPosDrawWdg* exb = new StringPosDrawWdg(wp, "sposdrawwdg", 600, 400, 0, 0); 494 523 exb->SetBinding(PIBK_fixed,PIBK_elastic,PIBK_elastic,PIBK_elastic); 495 524 wp->SetUserData(exb);
Note:
See TracChangeset
for help on using the changeset viewer.