示例#1
0
static void RasterUpdate (int xLeft, int yTop, int nScaling)
{
    int x, y;
    int nStep;

    LT_GraphicsClearScreen ();

    nStep = MIN (FIELD_WIDTH / nRasterWidth, FIELD_HEIGHT / nRasterHeight);

    if (nStep == 0) nStep = 1;

    _setcolor (15);
    _rectangle (_GFILLINTERIOR,
                (0                     - xLeft) / nScaling,
                (0                     - yTop)  / nScaling,
                (nRasterWidth  * nStep - xLeft) / nScaling,
                (nRasterHeight * nStep - yTop)  / nScaling);

    _setcolor (0);

    for (x = 0; x < nRasterWidth; x++)
    {
        for (y = 0; y < nRasterHeight; y++)
        {
            if ((pRaster [y * nRasterByteWidth + x / 8] << x % 8) & 0x80)
            {
                _rectangle (_GFILLINTERIOR,
                    (x       * nStep - xLeft) / nScaling,
                    (y       * nStep - yTop)  / nScaling,
                    ((x + 1) * nStep - xLeft) / nScaling,
                    ((y + 1) * nStep - yTop)  / nScaling);
            }
        }
    }

    _setcolor (7);

    for (x = 0; x <= nRasterWidth; x++)
    {
        _moveto ((x * nStep             - xLeft) / nScaling,
                 (0                     - yTop)  / nScaling);
        _lineto ((x * nStep             - xLeft) / nScaling,
                 (nRasterHeight * nStep - yTop)  / nScaling);
    }

    for (y = 0; y <= nRasterHeight; y++)
    {
        _moveto ((0                    - xLeft) / nScaling,
                 (y * nStep            - yTop)  / nScaling);
        _lineto ((nRasterWidth * nStep - xLeft) / nScaling,
                 (y * nStep            - yTop)  / nScaling);
    }
}
示例#2
0
文件: FED.C 项目: MegaGod/TW
/** setvideomode
*   init_cursor
*/
void setup_screen( void ) {
	extern int herc_align;

	registerfarbgidriver( EGAVGA_driver_far );
	registerfarbgidriver( Herc_driver_far );

	setgraph( );
	if ( scrmode == HERCMONO ) {
		writech = hgcwritech;
		if ( herc_align ) {
			align = 40;
		}/* else {
		 align = 0 (init already)
		 }*/
	} else {
		writech = ewritech;
		herc_align = 0;
	}

	init_graph_and_cursor( );

	clsall( );
	/*
	_rectangle( 0 + align, 0, 639 + align, 347 );
	*/
	_rectangle( 0, 0, 639, 347 );
	prakeaw( );
	dispstrhgc( "¨ØÌÒŧ¡Ã³ìÁËÒÇÔ·ÂÒÅÑÂ", 6, 0, BOLDATTR );
	/*
	_line( 0 + align, 24, 639 + align, 24 );
	*/
	_line( 0, 24, 639, 24 );
}
示例#3
0
static void RootsUpdate (int xLeft, int yTop, int nScaling)
{
    ROOT *pRoot;

    LT_GraphicsClearScreen ();

    for (pRoot = cf::Roots::first(); pRoot < pAfterRoots; pRoot++)
    {
        int nColor = 8;

        if (pRoot -> bType & ROOT_LETTER)       nColor |= 1;
        if (pRoot -> bType & ROOT_RECOGNIZED)   nColor |= 2;
        if (pRoot->isLayoutDust())              nColor |= 4;

        if (pRoot -> bType & ROOT_DEBUG)        nColor = 14;

        _setcolor (nColor);

        _rectangle (_GFILLINTERIOR,
            (pRoot -> xColumn - xLeft) / nScaling,
            (pRoot -> yRow    - yTop)  / nScaling,
            (pRoot -> xColumn + pRoot ->nWidth  - 1 - xLeft) / nScaling,
            (pRoot -> yRow    + pRoot ->nHeight - 1 - yTop)  / nScaling);
    }

    SeparatorsOutput (xLeft, yTop, nScaling);
}
示例#4
0
static void StringsDownOrderUpdate (int xLeft, int yTop, int nScaling)
{
    STRING *p;
    int nString;

    struct textsettings ts;
    int x, y;
    char szTextBuffer [128];

    LT_GraphicsClearScreen ();

    _gettextsettings (&ts);
    _setcharsize (ts.height / 2, ts.width / 2);
    _settextalign (_CENTER, _HALF);

    for (nString = 1, p = pStringsDownList; p != NULL; p = p -> pUp, nString++)
    {
        _setcolor (p -> uFlags & SF_NEED_DELETE ? 15 : NUMBER_TO_COLOR (nString));
        _rectangle (_GBORDER,
                    (p -> xLeft   - xLeft) / nScaling,
                    (p -> yTop    - yTop)  / nScaling,
                    (p -> xRight  - xLeft) / nScaling,
                    (p -> yBottom - yTop)  / nScaling);

        x = ((p -> xLeft + p -> xRight)  / 2 - xLeft) / nScaling;
        y = ((p -> yTop  + p -> yBottom) / 2 - yTop)  / nScaling;

        _setcolor (15);
        sprintf (szTextBuffer, "%d", nString);
        _grtext (x, y, szTextBuffer);
    }

    _setcharsize (ts.height, ts.width);
}
示例#5
0
static void Do_Demo1( void )
/*========================*/
{
    int                 width, y;

/*  sweep text in from top & bottom of screen, gradually increasing
    character size as the center of the screen is approached. */

    _setcolor( TextColour );
    width = 0;
    for( y = 5; y < VC.numypixels / 2 - 10; y += 5, ++width ) {
        DrawText( width, y );
    }

/*  draw text over final positions using a different color index */

    _setcolor( TextColour2 );
    DrawText( width, y );

/*  draw a border around the screen */

    _setcolor( BorderColour );
    _rectangle( _GBORDER, 0, 0, VC.numxpixels - 1, VC.numypixels - 1 );
    if( VC.adapter > _MCGA ) {
        FadeColors();
    }
}
示例#6
0
文件: main.cpp 项目: iliis/MBH_dosgui
void draw_color_table() {
	_clearscreen(_GCLEARSCREEN);

	for (unsigned int c = 0; c < 256; ++c) {
		_setcolor(c);
		int x = (c % 16) * 10;
		int y = (c >> 4) * 10;
		_rectangle(_GFILLINTERIOR, x, y, x+10, y+10);
	}
}
示例#7
0
static void BlockRectangle (BLOCK *p, short fill,
                            int xLeft, int yTop, int nScaling)
{
    switch (p -> Type)
    {
        case BLOCK_NULL:
            return;

        case BLOCK_PICTURE:
        case BLOCK_TEXT:
            _rectangle (fill,
                (p -> Rect.xLeft   - xLeft) / nScaling,
                (p -> Rect.yTop    - yTop)  / nScaling,
                (p -> Rect.xRight  - xLeft) / nScaling,
                (p -> Rect.yBottom - yTop)  / nScaling);
            break;

        case BLOCK_HORZ_SEPARATOR:
        case BLOCK_VERT_SEPARATOR:
            _setcolor (15);
            _rectangle (_GBORDER,
                (p -> Rect.xLeft   - xLeft) / nScaling,
                (p -> Rect.yTop    - yTop)  / nScaling,
                (p -> Rect.xRight  - xLeft) / nScaling,
                (p -> Rect.yBottom - yTop)  / nScaling);
            break;

        case BLOCK_RECT_SEPARATOR:
            _setcolor (14);
            _rectangle (_GBORDER,
                (p -> Rect.xLeft   - xLeft) / nScaling + 3,
                (p -> Rect.yTop    - yTop)  / nScaling + 3,
                (p -> Rect.xRight  - xLeft) / nScaling - 3,
                (p -> Rect.yBottom - yTop)  / nScaling - 3);
            break;
    }
}
示例#8
0
static void BlocksUpdate (int xLeft, int yTop, int nScaling)
{
    BLOCK *p;
    ROOT *pRoot;
    int  nColor;

    LT_GraphicsClearScreen ();

    for (p = pBlocksList; p != NULL; p = p -> pNext)
    {
        nColor = NUMBER_TO_COLOR (p -> nNumber) |
                 (((p -> uFlags & BF_NOT_BREAK_BLOCK) != 0) << 3);

        _setcolor (nColor);
        BlockRectangle (p, _GBORDER, xLeft, yTop, nScaling);

        SeparatorOutput (p -> pUpSep,    nColor, SEPOUT_DASH_1, xLeft, yTop, nScaling);
        SeparatorOutput (p -> pDownSep,  nColor, SEPOUT_DASH_2, xLeft, yTop, nScaling);
        SeparatorOutput (p -> pLeftSep,  nColor, SEPOUT_DASH_1, xLeft, yTop, nScaling);
        SeparatorOutput (p -> pRightSep, nColor, SEPOUT_DASH_2, xLeft, yTop, nScaling);
    }

    for (pRoot = cf::Roots::first(); pRoot < pAfterRoots; pRoot++)
    {
        if (pRoot -> nBlock == REMOVED_BLOCK_NUMBER)
        {

        }
        else
        {
            if (pRoot -> nBlock == DUST_BLOCK_NUMBER)
                _setcolor (15);
            else
                _setcolor (NUMBER_TO_COLOR (pRoot -> nBlock));

            _rectangle (_GFILLINTERIOR,
                (pRoot -> xColumn - xLeft) / nScaling,
                (pRoot -> yRow    - yTop)  / nScaling,
                (pRoot -> xColumn + pRoot ->nWidth  - 1
                                        - xLeft) / nScaling,
                (pRoot -> yRow    + pRoot ->nHeight - 1
                                        - yTop)  / nScaling);
        }
    }
}
示例#9
0
void press_key()
//==============

//  Display a message and wait for the user to press a key

{
    int                 len;
    char                *msg;
    struct _fontinfo    info;

    _getfontinfo( &info );
    msg = " Press any key ";
    len = _getgtextextent( msg );
    _setcolor( 4 );
    _rectangle( _GFILLINTERIOR, xmax - len, 0,
                                xmax - 1, info.pixheight + 2 );
    _setcolor( 15 );
    _moveto( xmax - len, 1 );
    _outgtext( msg );
    getch();
}
示例#10
0
static void SeparatorOutput (SEPARATOR *pSep,
                             int nColor, int OutputMode,
                             int xLeft, int yTop, int nScaling)
{
    if (pSep == NULL)
        return;

    _setcolor (nColor);

    switch (OutputMode)
    {
        case SEPOUT_LINE:   break;
        case SEPOUT_DASH_1: _setlinestyle (0xf0f0); break;
        case SEPOUT_DASH_2: _setlinestyle (0x0f0f); break;
    }

    switch (pSep -> Type)
    {
        default:
            break;

        case SEP_VERT:
        case SEP_HORZ:
            _moveto ((pSep -> xBegin - xLeft) / nScaling,
                     (pSep -> yBegin - yTop)  / nScaling);
            _lineto ((pSep -> xEnd   - xLeft) / nScaling,
                     (pSep -> yEnd   - yTop)  / nScaling);
            break;

        case SEP_RECT:
            _rectangle (_GBORDER,
                        (pSep -> xBegin - xLeft) / nScaling + 3,
                        (pSep -> yBegin - yTop)  / nScaling + 3,
                        (pSep -> xEnd   - xLeft) / nScaling - 3,
                        (pSep -> yEnd   - yTop)  / nScaling - 3);
            break;
    }

    _setlinestyle (0xffff);
}
示例#11
0
static void BreakingUpdate (int xLeft, int yTop, int nScaling)
{
    int x, y;
    int nStep;

    LT_GraphicsClearScreen ();

    nStep = MIN (FIELD_WIDTH / nRasterWidth, FIELD_HEIGHT / nRasterHeight);

    if (nStep == 0)
        nStep = 1;

    _setcolor (15);
    _rectangle (_GFILLINTERIOR,
                (0                     - xLeft) / nScaling,
                (0                     - yTop)  / nScaling,
                (nRasterWidth  * nStep - xLeft) / nScaling,
                (nRasterHeight * nStep - yTop)  / nScaling);

    for (x = 0; x < nRasterWidth; x++)
    {
        for (y = 0; y < nRasterHeight; y++)
        {
            if ((pRaster [y * nRasterByteWidth + x / 8] << x % 8) & 0x80)
                _setcolor (0);
            else if (y == yRasterBreakLine)
                _setcolor (12);
            else if (y >= yRasterUpBreakLimit && y <= yRasterDownBreakLimit)
                _setcolor (14);
            else
                continue;

            _rectangle (_GFILLINTERIOR,
                (x       * nStep - xLeft) / nScaling,
                (y       * nStep - yTop)  / nScaling,
                ((x + 1) * nStep - xLeft) / nScaling,
                ((y + 1) * nStep - yTop)  / nScaling);
        }
    }

    _setcolor (7);

    for (x = 0; x <= nRasterWidth; x++)
    {
        _moveto ((x * nStep             - xLeft) / nScaling,
                 (0                     - yTop)  / nScaling);
        _lineto ((x * nStep             - xLeft) / nScaling,
                 (nRasterHeight * nStep - yTop)  / nScaling);
    }

    for (y = 0; y <= nRasterHeight; y++)
    {
        _moveto ((0                    - xLeft) / nScaling,
                 (y * nStep            - yTop)  / nScaling);
        _lineto ((nRasterWidth * nStep - xLeft) / nScaling,
                 (y * nStep            - yTop)  / nScaling);
    }

    _setcolor (9);

    for (y = 0; y <= nRasterHeight; y++)
    {
        _rectangle (_GFILLINTERIOR,
            ((nRasterWidth + 1) * nStep - xLeft) / nScaling,
            (y                  * nStep - yTop)  / nScaling,
            ((aRasterHystogram [y] + nRasterWidth + 1)
                                * nStep - xLeft) / nScaling,
            ((y + 1)            * nStep - yTop)  / nScaling);
    }
}
示例#12
0
static void StringsUpdate (int xLeft, int yTop, int nScaling)
{
    STRING *pString;
    ROOT        *pRoot;
    int nString;
    int nColor;
    int nDustShift;
    int i;
    unsigned old_style;

    LT_GraphicsClearScreen ();

    for (pString = pStringsUpList, nString = 0;
             pString != NULL;
                 pString = pString -> pDown, nString++)
    {
        nColor     = NUMBER_TO_COLOR (nString);
        nDustShift = 2 * (nString % 6 + 1);

        _setcolor (nColor + 8);
        _rectangle (_GBORDER,
                    (pString -> xLeft   - xLeft) / nScaling,
                    (pString -> yTop    - yTop)  / nScaling,
                    (pString -> xRight  - xLeft) / nScaling,
                    (pString -> yBottom - yTop)  / nScaling);

        for (i = 0; i < pString -> nLetters; i++)
        {
            pRoot = cf::Roots::at(pString -> pLettersList [i]);
            _setcolor ((pRoot -> bType & ROOT_SPECIAL_LETTER) ? 15 : nColor);
            _rectangle (_GFILLINTERIOR,
                (pRoot -> xColumn - xLeft) / nScaling + nDustShift,
                (pRoot -> yRow    - yTop)  / nScaling,
                (pRoot -> xColumn + pRoot ->nWidth  - 1
                                        - xLeft) / nScaling + nDustShift,
                (pRoot -> yRow    + pRoot ->nHeight - 1
                                        - yTop)  / nScaling);
        }

        _setcolor (nColor + 8);

        for (i = 0; i < pString -> nDust; i++)
        {
            pRoot = cf::Roots::at(pString -> pDustList [i]);

            if (pRoot -> bType & ROOT_USED)
                continue;

            _rectangle (_GBORDER,
                (pRoot -> xColumn - xLeft) / nScaling + nDustShift,
                (pRoot -> yRow    - yTop)  / nScaling,
                (pRoot -> xColumn + pRoot ->nWidth - 1
                                        - xLeft) / nScaling + nDustShift,
                (pRoot -> yRow    + pRoot ->nHeight - 1
                                        - yTop)  / nScaling);
        }

        _setcolor (15);

        for (i = 0; i < pString -> nDust; i++)
        {
            pRoot = cf::Roots::at(pString -> pDustList [i]);

            if (pRoot -> bType & ROOT_USED)
                continue;

            _rectangle (_GBORDER,
                (pRoot -> xColumn - xLeft) / nScaling,
                (pRoot -> yRow    - yTop)  / nScaling,
                (pRoot -> xColumn + pRoot ->nWidth - 1
                                        - xLeft) / nScaling,
                (pRoot -> yRow    + pRoot ->nHeight - 1
                                        - yTop)  / nScaling);
        }

        _setcolor (nColor + 8);

        old_style = _getlinestyle ();
        _setlinestyle (0xcccc);

        _moveto ((pString -> xLeft  - xLeft) / nScaling,
                 (pString -> yMin   - yTop)  / nScaling);
        _lineto ((pString -> xRight - xLeft) / nScaling,
                 (pString -> yMin   - yTop)  / nScaling);

        _moveto ((pString -> xLeft  - xLeft) / nScaling,
                 (pString -> yMax   - yTop)  / nScaling);
        _lineto ((pString -> xRight - xLeft) / nScaling,
                 (pString -> yMax   - yTop)  / nScaling);
        _setlinestyle (old_style);

        _setcolor (12);
        _rectangle (_GBORDER,
                    (pString -> xLeft   - xLeft) / nScaling,
                    (pString -> yTop    - yTop)  / nScaling,
                    (pString -> xRight  - xLeft) / nScaling,
                    (pString -> yBottom - yTop)  / nScaling);

        _setcolor (15);
        _moveto ((pString -> xLeft         - xLeft) / nScaling,
                 (pString -> yMiddleTop    - yTop)  / nScaling);
        _lineto ((pString -> xRight        - xLeft) / nScaling,
                 (pString -> yMiddleTop    - yTop)  / nScaling);

        _moveto ((pString -> xLeft         - xLeft) / nScaling,
                 (pString -> yMiddleBottom - yTop)  / nScaling);
        _lineto ((pString -> xRight        - xLeft) / nScaling,
                 (pString -> yMiddleBottom - yTop)  / nScaling);
    }

    SeparatorsOutput (xLeft, yTop, nScaling);
}
示例#13
0
static void CurrentStringUpdate (int xLeft, int yTop, int nScaling)
{
    ROOT *pRoot;
    int i;
    unsigned old_style;

    LT_GraphicsClearScreen ();

    for (i = 0; i < String.nLetters; i++)
    {
        pRoot = cf::Roots::at(String.pLettersList[i]);

        _setcolor ((pRoot -> bType & ROOT_SPECIAL_LETTER) ? 15 : 10);
        _rectangle (_GFILLINTERIOR,
            (pRoot -> xColumn                       - xLeft) / nScaling,
            (pRoot -> yRow                          - yTop)  / nScaling,
            (pRoot -> xColumn + pRoot ->nWidth  - 1 - xLeft) / nScaling,
            (pRoot -> yRow    + pRoot ->nHeight - 1 - yTop)  / nScaling);
    }

    _setcolor (10);

    for (i = 0; i < String.nDust; i++)
    {
        pRoot = cf::Roots::at(String.pDustList[i]);

        _rectangle (_GBORDER,
            (pRoot -> xColumn                        - xLeft) / nScaling - 1,
            (pRoot -> yRow                           - yTop)  / nScaling - 1,
            (pRoot -> xColumn + pRoot -> nWidth  - 1 - xLeft) / nScaling + 1,
            (pRoot -> yRow    + pRoot -> nHeight - 1 - yTop)  / nScaling + 1);
    }

    old_style = _getlinestyle ();
    _setlinestyle (0xcccc);

    _moveto ((String.xLeft  - xLeft) / nScaling,
             (String.yMin   - yTop)  / nScaling);
    _lineto ((String.xRight - xLeft) / nScaling,
             (String.yMin   - yTop)  / nScaling);

    _moveto ((String.xLeft  - xLeft) / nScaling,
             (String.yMax   - yTop)  / nScaling);
    _lineto ((String.xRight - xLeft) / nScaling,
             (String.yMax   - yTop)  / nScaling);
    _setlinestyle (old_style);

    _setcolor (12);
    _rectangle (_GBORDER,
                (String.xLeft   - xLeft) / nScaling,
                (String.yTop    - yTop)  / nScaling,
                (String.xRight  - xLeft) / nScaling,
                (String.yBottom - yTop)  / nScaling);

    _setcolor (15);
    _moveto ((String.xLeft         - xLeft) / nScaling,
             (String.yMiddleTop    - yTop)  / nScaling);
    _lineto ((String.xRight        - xLeft) / nScaling,
             (String.yMiddleTop    - yTop)  / nScaling);

    _moveto ((String.xLeft         - xLeft) / nScaling,
             (String.yMiddleBottom - yTop)  / nScaling);
    _lineto ((String.xRight        - xLeft) / nScaling,
             (String.yMiddleBottom - yTop)  / nScaling);
}
示例#14
0
static void HystogramUpdate (int xLeft, int yTop, int nScaling)
{
    char szBuffer [32];
    int i;
    int nMaxValue;
    int iMaxColumn;
    struct textsettings ts;
    int nCharHeight;
	ROOT *pRoot;//Rom

    LT_GraphicsClearScreen ();

    nMaxValue  = 0;
    iMaxColumn = 0;

	/**/
    for (pRoot = cf::Roots::first(); pRoot < pAfterRoots; pRoot++)
    {
		if(pRoot->nBlock == pDebugBlock->nNumber)
		{
			int nColor = 8;

			if (pRoot -> bType & ROOT_LETTER)       nColor |= 1;
			if (pRoot -> bType & ROOT_RECOGNIZED)   nColor |= 2;
                        if (pRoot->isLayoutDust())              nColor |= 4;

			if (pRoot -> bType & ROOT_DEBUG)        nColor = 14;

			_setcolor (nColor);

			_rectangle (_GFILLINTERIOR,
				(pRoot -> xColumn - xLeft) / nScaling,
				(pRoot -> yRow    - yTop)  / nScaling,
				(pRoot -> xColumn + pRoot ->nWidth  - 1 - xLeft) / nScaling,
				(pRoot -> yRow    + pRoot ->nHeight - 1 - yTop)  / nScaling);
		}
    }
	/**/

    for (i = 0; i < nHystColumns; i++)
    {
        if (nMaxValue < pHystogram [i])
        {
            nMaxValue  = pHystogram [i];
            iMaxColumn = i;
        }
    }

    if (nMaxValue < 10)
        nMaxValue = 10;

    _gettextsettings (&ts);

    for (i = 0; i < nHystColumns; i++)
    {
        if (pHystogram [i] == 0)
        {

        }
        else
        {
            _setcolor (9);

            _rectangle (_GFILLINTERIOR,
                (i * VIEW_WIDTH / nHystColumns + VIEW_LEFT
                                                     - xLeft) / nScaling,
                (VIEW_BOTTOM - pHystogram [i] * VIEW_HEIGHT / nMaxValue
                                                     - yTop)  / nScaling,
                ((i + 1) * VIEW_WIDTH / nHystColumns + VIEW_LEFT
                                                     - xLeft) / nScaling,
                (VIEW_BOTTOM
                                                     - yTop)  / nScaling);
        }
    }

    _setcolor (12);

    _moveto (((xDebugVertLine - pDebugBlock -> Rect.xLeft)
                  * VIEW_WIDTH / nHystColumns
                        + VIEW_WIDTH / nHystColumns / 2
                        + VIEW_LEFT
                        - xLeft) / nScaling, 0);
    _lineto (((xDebugVertLine - pDebugBlock -> Rect.xLeft)
                  * VIEW_WIDTH / nHystColumns
                        + VIEW_WIDTH / nHystColumns / 2
                        + VIEW_LEFT
                        - xLeft) / nScaling, SCREEN_HEIGHT);

    _setcolor (15);
    _settextalign (_RIGHT, _TOP);
    nCharHeight = VIEW_HEIGHT / 10 / nScaling / 2;
    _setcharsize (nCharHeight, nCharHeight / 2);

    for (i = 0; i < nMaxValue - nMaxValue / 20; i += MAX (nMaxValue / 10, 1))
    {
        _moveto ((VIEW_LEFT                                 - xLeft)/ nScaling,
                 (VIEW_BOTTOM - i * VIEW_HEIGHT / nMaxValue - yTop) / nScaling);
        _lineto ((VIEW_RIGHT                                - xLeft)/ nScaling,
                 (VIEW_BOTTOM - i * VIEW_HEIGHT / nMaxValue - yTop) / nScaling);

        if (i != 0)
        {
            sprintf (szBuffer, "%d\n", i);
            _grtext ((VIEW_LEFT - xLeft) / nScaling,
                (VIEW_BOTTOM - i * VIEW_HEIGHT / nMaxValue - yTop) / nScaling,
                 szBuffer);
        }
    }

    sprintf (szBuffer, "%d\n", nMaxValue);
    _grtext ((VIEW_LEFT - xLeft) / nScaling,
             (VIEW_TOP  - yTop)  / nScaling,
             szBuffer);

    _rectangle (_GBORDER,
                (VIEW_LEFT   - xLeft) / nScaling,
                (VIEW_TOP    - yTop)  / nScaling,
                (VIEW_RIGHT  - xLeft) / nScaling,
                (VIEW_BOTTOM - yTop)  / nScaling);

    _setcharsize (ts.height, ts.width);
}