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); }
static void DrawText( short width, short y ) /*========================================== This routine displays the text strings. */ { int xc; xc = VC.numxpixels / 2; _setcharsize( width, width ); _settextalign( _CENTER, _BOTTOM ); _grtext( xc, y, "Graph Library" ); _setcharsize( width, width ); _settextalign( _CENTER, _TOP ); _grtext( xc, VC.numypixels - y, "TEST" ); }
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); }