Ignore:
Timestamp:
Aug 24, 2002, 10:14:05 PM (23 years ago)
Author:
umoeller
Message:

Misc changes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/gpih.c

    r201 r214  
    468468
    469469/*
    470  *@@ gpihDraw3DFrame:
     470 *@@ gpihDraw3DFrame2:
    471471 *      this draws a rectangle in 3D style with a given line width
    472472 *      and the given colors.
     
    481481 *      the bottom left and top right pixels to be drawn.
    482482 *
     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 *
    483487 *@@changed V0.9.0 [umoeller]: changed function prototype to have colors specified
    484488 *@@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_BUTTONLIGHT
    491                      LONG lColorRight)  // in: color to use for right and bottom; e.g. SYSCLR_BUTTONDARK
    492 {
    493     RECTL rcl2 = *prcl;
     489 *@@changed V0.9.21 (2002-08-24) [umoeller]: renamed, now modifying prcl on output
     490 */
     491
     492VOID 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{
    494498    USHORT us;
    495499    POINTL ptl1;
     
    501505        GpiSetColor(hps, lColorLeft);
    502506        // draw left line
    503         ptl1.x = rcl2.xLeft;
    504         ptl1.y = rcl2.yBottom;
     507        ptl1.x = prcl->xLeft;
     508        ptl1.y = prcl->yBottom;
    505509        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]
    507511        GpiLine(hps, &ptl1);
    508512        // 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]
    510514        GpiLine(hps, &ptl1);
    511515        // go down -> draw right
    512516        GpiSetColor(hps, lColorRight);
    513         ptl1.y = rcl2.yBottom;
     517        ptl1.y = prcl->yBottom;
    514518        GpiLine(hps, &ptl1);
    515519        // go left -> draw bottom
    516         ptl1.x = rcl2.xLeft;
     520        ptl1.x = prcl->xLeft;
    517521        GpiLine(hps, &ptl1);
    518522
    519         rcl2.xLeft++;
    520         rcl2.yBottom++;
    521         rcl2.xRight--;
    522         rcl2.yTop--;
     523        prcl->xLeft++;
     524        prcl->yBottom++;
     525        prcl->xRight--;
     526        prcl->yTop--;
    523527    }
     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
     539VOID 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);
    524547}
    525548
Note: See TracChangeset for help on using the changeset viewer.