Changeset 214 for trunk/src/helpers/gpih.c
- Timestamp:
- Aug 24, 2002, 10:14:05 PM (23 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/helpers/gpih.c
r201 r214 468 468 469 469 /* 470 *@@ gpihDraw3DFrame :470 *@@ gpihDraw3DFrame2: 471 471 * this draws a rectangle in 3D style with a given line width 472 472 * and the given colors. … … 481 481 * the bottom left and top right pixels to be drawn. 482 482 * 483 * Note: With V0.9.21, this now modifies prcl to be smaller towards 484 * the center of the rectangle by usWidth so you can call this several 485 * times with different colors. 486 * 483 487 *@@changed V0.9.0 [umoeller]: changed function prototype to have colors specified 484 488 *@@changed V0.9.7 (2000-12-20) [umoeller]: now really using inclusive rectangle... 485 * /486 487 VOID gpihDraw3DFrame(HPS hps, 488 PRECTL prcl, // in: rectangle (inclusive) 489 USHORT usWidth, // in: line width (>= 1)490 LONG lColorLeft, // in: color to use for left and top; e.g. SYSCLR_BUTTONLIGHT491 LONG lColorRight) // in: color to use for right and bottom; e.g. SYSCLR_BUTTONDARK492 { 493 RECTL rcl2 = *prcl; 489 *@@changed V0.9.21 (2002-08-24) [umoeller]: renamed, now modifying prcl on output 490 */ 491 492 VOID gpihDraw3DFrame2(HPS hps, 493 PRECTL prcl, // in: rectangle (inclusive) 494 USHORT usWidth, // in: line width (>= 1) 495 LONG lColorLeft, // in: color to use for left and top; e.g. SYSCLR_BUTTONLIGHT 496 LONG lColorRight) // in: color to use for right and bottom; e.g. SYSCLR_BUTTONDARK 497 { 494 498 USHORT us; 495 499 POINTL ptl1; … … 501 505 GpiSetColor(hps, lColorLeft); 502 506 // draw left line 503 ptl1.x = rcl2.xLeft;504 ptl1.y = rcl2.yBottom;507 ptl1.x = prcl->xLeft; 508 ptl1.y = prcl->yBottom; 505 509 GpiMove(hps, &ptl1); 506 ptl1.y = rcl2.yTop; // V0.9.7 (2000-12-20) [umoeller]510 ptl1.y = prcl->yTop; // V0.9.7 (2000-12-20) [umoeller] 507 511 GpiLine(hps, &ptl1); 508 512 // go right -> draw top 509 ptl1.x = rcl2.xRight; // V0.9.7 (2000-12-20) [umoeller]513 ptl1.x = prcl->xRight; // V0.9.7 (2000-12-20) [umoeller] 510 514 GpiLine(hps, &ptl1); 511 515 // go down -> draw right 512 516 GpiSetColor(hps, lColorRight); 513 ptl1.y = rcl2.yBottom;517 ptl1.y = prcl->yBottom; 514 518 GpiLine(hps, &ptl1); 515 519 // go left -> draw bottom 516 ptl1.x = rcl2.xLeft;520 ptl1.x = prcl->xLeft; 517 521 GpiLine(hps, &ptl1); 518 522 519 rcl2.xLeft++;520 rcl2.yBottom++;521 rcl2.xRight--;522 rcl2.yTop--;523 prcl->xLeft++; 524 prcl->yBottom++; 525 prcl->xRight--; 526 prcl->yTop--; 523 527 } 528 } 529 530 /* 531 *@@ gpihDraw3DFrame: 532 * compatibility function for those who used the 533 * export. As opposed to gpihDraw3DFrame2, this 534 * does not modify prcl. 535 * 536 *@@added V0.9.21 (2002-08-24) [umoeller] 537 */ 538 539 VOID gpihDraw3DFrame(HPS hps, 540 PRECTL prcl, // in: rectangle (inclusive) 541 USHORT usWidth, // in: line width (>= 1) 542 LONG lColorLeft, // in: color to use for left and top; e.g. SYSCLR_BUTTONLIGHT 543 LONG lColorRight) // in: color to use for right and bottom; e.g. SYSCLR_BUTTONDARK 544 { 545 RECTL rcl2 = *prcl; 546 gpihDraw3DFrame2(hps, &rcl2, usWidth, lColorLeft, lColorRight); 524 547 } 525 548
Note:
See TracChangeset
for help on using the changeset viewer.