Annotation of mstools/samples/fontview/display.c, revision 1.1.1.2

1.1       root        1: #include <windows.h>
                      2: #include <string.h>
1.1.1.2 ! root        3: #include <math.h>
1.1       root        4: 
1.1.1.2 ! root        5: #if defined (WIN32)
        !             6: #define _MoveTo(hdc,x,y) MoveToEx(hdc,x,y,NULL)
        !             7: #else
        !             8: #define _MoveTo(hdc,x,y) MoveTo(hdc,x,y)
        !             9: #endif
1.1       root       10: 
1.1.1.2 ! root       11: // These are the 'exported' functions from this file:
        !            12: void DrawAscii (HDC hdc, RECT *pRect, WORD direction);
        !            13: void DrawGlyph (HDC hdc, RECT *pRect, BYTE glyph, HFONT hfont);
        !            14: BYTE FindChar (HDC hdc, RECT *pRect, int x, int y);
1.1       root       15: 
1.1.1.2 ! root       16: // A data structure that DrawAscii will use:
1.1       root       17: char ascii[]=
1.1.1.2 ! root       18:     {
        !            19:     // Low Ascii:
        !            20: 
        !            21:     1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19,
        !            22:     20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31,
        !            23: 
        !            24:     // Standard Ascii:
        !            25: 
        !            26:     ' ', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',',
        !            27:     '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
        !            28:     ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F',
        !            29:     'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S',
        !            30:     'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_', '`',
        !            31:     'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
        !            32:     'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
        !            33:     '{', '|', '}', '~', '',
        !            34: 
        !            35:     // High Ascii:
        !            36: 
        !            37:     '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
        !            38:     '\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
        !            39:     '\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
        !            40:     '\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
        !            41:     '\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
        !            42:     '\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
        !            43:     '\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
        !            44:     '\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
        !            45: 
        !            46:     // End of the list:
        !            47: 
        !            48:     000, 000};
1.1       root       49: 
                     50: /* A function that the CharSet window will use to display the text */
1.1.1.2 ! root       51: void DrawAscii (HDC hdc, RECT *pRect, WORD direction)
        !            52: {
        !            53:     BYTE *pch;
        !            54:     int h, w, incx, incy, width;
        !            55:     unsigned int  wDisplay;
        !            56:     POINT pt;
        !            57:     TEXTMETRIC tm;
        !            58:     BOOL bLineMode = FALSE;
        !            59: 
        !            60: 
        !            61:     GetTextMetrics (hdc, &tm);
        !            62:     h = tm.tmHeight;
        !            63:     w = tm.tmMaxCharWidth;
        !            64: 
        !            65:     incx = 0;
        !            66:     incy = h;
        !            67:     pt.x = 0;
        !            68:     pt.y = 0;
        !            69: 
        !            70:     //
        !            71:     pt.y = tm.tmAscent + tm.tmExternalLeading;
        !            72:     //
        !            73: 
        !            74:     pch = &(ascii[tm.tmFirstChar]);
        !            75:     wDisplay = pRect->right -pRect->left;
        !            76: 
        !            77:     //
        !            78:     SetTextAlign (hdc, TA_BASELINE | TA_CENTER);
        !            79:     SetBkMode (hdc, TRANSPARENT);
        !            80:     //
        !            81: 
        !            82:     while (pch[0] && (pch[0]<=tm.tmLastChar)) {
        !            83: #if defined (WIN32)
        !            84:         SIZE size;
        !            85:         GetTextExtentPoint (hdc, pch, 1, &size);
        !            86:         width = size.cx;
        !            87: #else
        !            88:         width = LOWORD (GetTextExtent (hdc, pch, 1));
        !            89: #endif
        !            90:         if ((unsigned)(pt.x + width) > wDisplay) {
        !            91:             pt.x = 0;
        !            92:             pt.y += incy;
        !            93:         }
        !            94:         TextOut (hdc, pt.x + (width/2), pt.y, pch, 1);
        !            95:         pt.x += width;
        !            96:         pch++;
        !            97:     }
        !            98:     return;
1.1       root       99: 
1.1.1.2 ! root      100:     direction;
        !           101: }
        !           102: 
        !           103: // Return the character that was drawn at the provided location
        !           104: // This allows us to 'click' on a character, and determined what
        !           105: // it was we actually clicked on.
        !           106: BYTE FindChar (HDC hdc, RECT *pRect, int x, int y)
        !           107: {
        !           108:     BYTE *pch;
        !           109:     int h, w, incx, incy, width;
        !           110:     unsigned int wDisplay;
        !           111:     POINT pt;
        !           112:     TEXTMETRIC tm;
        !           113:     BOOL bLineMode = FALSE;
        !           114: 
        !           115: 
        !           116:     GetTextMetrics (hdc, &tm);
        !           117:     h = tm.tmHeight;
        !           118:     w = tm.tmMaxCharWidth;
        !           119: 
        !           120:     incx = 0;
        !           121:     incy = h;
        !           122:     pt.x = 0;
        !           123:     pt.y = 0;
        !           124: 
        !           125:     pch = &(ascii[tm.tmFirstChar]);
        !           126:     wDisplay = pRect->right -pRect->left;
        !           127: 
        !           128:     while (pch[0] && (pch[0]<=tm.tmLastChar)) {
        !           129: #if defined (WIN32)
        !           130:         SIZE size;
        !           131:         GetTextExtentPoint (hdc, pch, 1, &size);
        !           132:         width = size.cx;
        !           133: #else
        !           134:         width = LOWORD (GetTextExtent (hdc, pch, 1));
        !           135: #endif
        !           136:         if ((unsigned)(pt.x + width) > wDisplay) {
        !           137:             pt.x = 0;
        !           138:             pt.y += incy;
        !           139:         }
        !           140:         if ((x>=pt.x) && (x <=(pt.x+width)) && (y>=pt.y) && (y<=pt.y+incy)) return pch[0];
        !           141:         pt.x += width;
        !           142:         pch++;
        !           143:     }
        !           144:     return 0;
        !           145: }
        !           146: 
        !           147: // Essentially, a StretchBlt, but draws cicular pels.
        !           148: BOOL CircleBlt (HDC hdcDest, int xDst, int yDst, int iWidthDst, int iHeightDst, HDC hdcSrc, int xSrc, int ySrc, int iWidthSrc, int iHeightSrc, DWORD dwROP)
        !           149: {
        !           150:     int x, y, x1, y1, x2, y2;
        !           151:     DWORD rgb;
        !           152:     float fXUnit, fYUnit;
        !           153:     HBRUSH hbrush, hbrushOld;
        !           154: 
        !           155:     if (iWidthSrc != 0){
        !           156:         fXUnit = (float)iWidthDst / (float)iWidthSrc;
        !           157:     } else {
        !           158:         fXUnit = (float)iWidthDst;
        !           159:     }
        !           160:     if (iHeightSrc != 0) {
        !           161:         fYUnit = (float)iHeightDst / (float)iHeightSrc;
        !           162:     } else {
        !           163:         fYUnit = (float)iHeightDst;
        !           164:     }
        !           165: 
        !           166:     for (y=ySrc; y<(ySrc+iHeightSrc); y++) {
        !           167:         for (x=xSrc; x<(xSrc+iWidthSrc); x++) {
        !           168: 
        !           169:             rgb = GetPixel (hdcSrc, x, y);
        !           170:             if (rgb != -1 && rgb != 0x00FFFFFF) {
        !           171:                 hbrush = CreateSolidBrush (rgb);
        !           172:                 hbrushOld = SelectObject (hdcDest, hbrush);
        !           173:                 x1 = xDst + (int)((x-xSrc)*fXUnit);
        !           174:                 y1 = yDst + (int)((y-ySrc)*fYUnit);
        !           175:                 x2 = xDst + (int)(((x-xSrc)+1)*fXUnit)+1;
        !           176:                 y2 = yDst + (int)(((y-ySrc)+1)*fYUnit)+1;
        !           177:                 Ellipse (hdcDest, x1, y1, x2, y2);
        !           178:                 DeleteObject(SelectObject(hdcDest, hbrushOld));
        !           179:             }
        !           180:         }
        !           181:     }
1.1       root      182: 
1.1.1.2 ! root      183:     return TRUE;
        !           184: 
        !           185:     dwROP;
        !           186: }
1.1       root      187: 
1.1.1.2 ! root      188: double Radian(double ang)
        !           189: {
        !           190:        return ang * (double)3.1415926535 / (double)180.0;
        !           191: }
        !           192: 
        !           193: void CalcRot (double x, double y, double ang, double* x1, double* y1)
        !           194: {
        !           195:        ang = Radian(-ang);
        !           196:        *x1 = (x * cos(ang)) - (y * sin(ang));
        !           197:        *y1 = (x * sin(ang)) + (y * cos(ang));
        !           198: }
        !           199: 
        !           200: void DrawGlyph (HDC hdc, RECT *pRect, BYTE glyph, HFONT hfont)
        !           201: {
        !           202:     TEXTMETRIC tm;
        !           203:     LOGFONT lf;
        !           204:     int wChar, h1, h2, w1, w2, x, y;
        !           205:     double xTL, yTL, xTR, yTR, xBL, yBL, xBR, yBR, xML, yML, xMR, yMR;
        !           206:     int cWidth, cExtentW, cExtentH;
        !           207:     int unit, margin;
        !           208:     RECT rect, rectChar;
        !           209:     HDC hdcMem;
        !           210:     HBITMAP hbitmap, hbitmapOld;
        !           211:     HFONT hfontOld, hfontTmp;
        !           212:     char szText[80];
        !           213:     double fAng, fWa, fWb, fHa, fHb, fHeight, fWidth;
        !           214:     BOOL bRotateable;
        !           215:     double fxOff, fyOff;
        !           216: #if defined(TT_AVAILABLE)
        !           217:     ABC abc;
        !           218: #endif
        !           219: 
        !           220:     GetTextMetrics (hdc, &tm);
        !           221:     hfontTmp = SelectObject (hdc, GetStockObject(SYSTEM_FONT));
        !           222:     GetObject (hfontTmp, sizeof(LOGFONT), &lf);
        !           223: 
        !           224: // Some fields of 'lf' need to be whacked out depending on the type of
        !           225: // font involved. For instance, lfEscapement should only be non-zero for
        !           226: // rotatable fonts.
        !           227:         bRotateable = FALSE;
        !           228: #if defined (TMPF_VECTOR)
        !           229:        bRotateable = (tm.tmPitchAndFamily & TMPF_VECTOR);
        !           230: #endif
        !           231: #if defined (TMPF_TRUETYPE)
        !           232:        bRotateable |= (tm.tmPitchAndFamily & TMPF_TRUETYPE);
        !           233: #endif
        !           234:        if (!bRotateable) {
        !           235:                lf.lfEscapement = 0;
1.1       root      236:        }
                    237: 
1.1.1.2 ! root      238:     SelectObject (hdc, hfontTmp);
        !           239:     GetCharWidth (hdc, glyph, glyph, &cWidth);
        !           240: 
        !           241: #if defined (WIN32)
        !           242:     {
        !           243:         SIZE size;
        !           244:         GetTextExtentPoint (hdc, (LPSTR)&glyph, 1, &size);
        !           245:         cExtentW = size.cx;
        !           246:         cExtentH = size.cy;
        !           247:     }
        !           248: #else
        !           249:     cExtentW = LOWORD (GetTextExtent (hdc, (LPSTR)&glyph, 1));
        !           250:     cExtentH = HIWORD (GetTextExtent (hdc, (LPSTR)&glyph, 1));
        !           251: #endif
        !           252: 
        !           253:     wChar = max(cWidth, cExtentW);
        !           254: 
        !           255: #if defined(TT_AVAILABLE)
        !           256:     if (GetCharABCWidths (hdc, (UINT)glyph, (UINT)glyph, &abc)) {
        !           257:        wChar = abc.abcA + abc.abcB + abc.abcC;
        !           258:        wChar = max(abc.abcA,0) + max (abc.abcB,0) + max (abc.abcC,0);
        !           259:     } else {
        !           260:        abc.abcA = 0;
        !           261:        abc.abcB = wChar;
        !           262:        abc.abcC = 0;
        !           263:     }
        !           264: #endif
        !           265: 
        !           266: // ****
        !           267:        // Lets figure out how large of a bitmap we need to draw this character into.
        !           268:        // This will take lfEscapement into account.
        !           269: 
        !           270:        // Turn the 'escapement' value into a valid angle
        !           271:     fAng = 90.0 - ((double)lf.lfEscapement/10.0);
        !           272: 
        !           273:     // We now need to calculate two values for height and width. These
        !           274:     // represent the bases of the triangles that are formed as the
        !           275:     // character cell rotates. Thus fWa+fWb is the 'width' of the space
        !           276:     // required by the given character at the current rotation.
        !           277:     // At 0, 90, 180, 270 and 360, one of the two values will be '0'.
        !           278:     fWa = (double)cExtentW * sin(Radian(fAng));
        !           279:     fHa = (double)cExtentW * sin(Radian((double)lf.lfEscapement/10.0));
        !           280:     fHb = (double)cExtentH * sin(Radian(fAng));
        !           281:     fWb = (double)cExtentH * sin(Radian((double)lf.lfEscapement/10.0));
        !           282: 
        !           283:     // This gives us a width/height of:
        !           284:     fHeight = fabs(fHa) + fabs(fHb);
        !           285:     fWidth = fabs(fWa) + fabs(fWb);
        !           286: // ****
        !           287: 
        !           288:     h1 = pRect->bottom - pRect->top;
        !           289:     h2 = tm.tmHeight + tm.tmExternalLeading;
        !           290:     h2 = (int)fHeight;
        !           291:     if (h2 == 0) {
        !           292:         MessageBeep (0);
        !           293:         h2 = 10;
        !           294:     }
        !           295: 
        !           296:     w1 = pRect->right - pRect->left;
        !           297:     w2 = (int)fWidth;
        !           298: 
        !           299:     unit = (h1 / h2);
        !           300: 
        !           301:     margin = (h1 - (unit * h2)) / 2;
        !           302:     margin = 0;
        !           303:     // Define a rectangle that will enclose our drawing area
        !           304:     SetRect (&rect, 0, 0, wChar*unit, (tm.tmHeight*unit) + (tm.tmExternalLeading*unit));
        !           305:     OffsetRect (&rect, margin, margin);
        !           306:     // Define a rectangle that will define the bounding box of the character
        !           307:     SetRect (&rectChar, 0, 0, wChar*unit, tm.tmHeight*unit);
        !           308:     OffsetRect (&rectChar, margin, margin + (tm.tmExternalLeading*unit));
        !           309: 
        !           310: 
        !           311: // ****
        !           312:     // These are floating point values.
        !           313:     SetRect (&rect, 0, 0, (int)(fWidth)*unit, ((int)(fHeight)*unit) + (tm.tmExternalLeading*unit));
        !           314:     OffsetRect (&rect, margin, margin);
        !           315:     // Define a rectangle that will define the bounding box of the character
        !           316:     SetRect (&rectChar, 0, 0, (int)(fWidth)*unit, ((int)(fHeight)*unit));
        !           317:     OffsetRect (&rectChar, margin, margin + (tm.tmExternalLeading*unit));
        !           318: 
        !           319:     // Calculate the points of the 'character cell'. This will take full
        !           320:     // rotation into consideration.
        !           321:        CalcRot (0, 0, (double)lf.lfEscapement/10.0, &xTL, &yTL);
        !           322:        CalcRot ((double)cExtentW, 0, (double)lf.lfEscapement/10.0, &xTR, &yTR);
        !           323:        CalcRot (0, (double)cExtentH, (double)lf.lfEscapement/10.0, &xBL, &yBL);
        !           324:        CalcRot ((double)cExtentW, (double)cExtentH, (double)lf.lfEscapement/10.0, &xBR, &yBR);
        !           325:        CalcRot (0, (double)tm.tmAscent, (double)lf.lfEscapement/10.0, &xML, &yML);
        !           326:        CalcRot ((double)cExtentW, (double)tm.tmAscent, (double)lf.lfEscapement/10.0, &xMR, &yMR);
        !           327: 
        !           328:        fxOff = min(xTL, min(xTR, min(xBL, xBR)));
        !           329:        fyOff = min(yTL, min(yTR, min(yBL, yBR)));
        !           330: 
        !           331: // Draw a rectangle around the drawing limits of the character.
        !           332:     _MoveTo (hdc, (int)((xTL-fxOff)*(double)unit), (int)((yTL-fyOff)*(double)unit));
        !           333:     LineTo (hdc, (int)((xTR-fxOff)*(double)unit), (int)((yTR-fyOff)*(double)unit));
        !           334:     LineTo (hdc, (int)((xBR-fxOff)*(double)unit), (int)((yBR-fyOff)*(double)unit));
        !           335:     LineTo (hdc, (int)((xBL-fxOff)*(double)unit), (int)((yBL-fyOff)*(double)unit));
        !           336:     LineTo (hdc, (int)((xTL-fxOff)*(double)unit), (int)((yTL-fyOff)*(double)unit));
        !           337: 
        !           338: // Draw the baseline, which indicates the advance width of the character
        !           339:     _MoveTo (hdc, (int)((xML-fxOff)*(double)unit), (int)((yML-fyOff)*(double)unit));
        !           340:     LineTo (hdc, (int)((xMR-fxOff)*(double)unit), (int)((yMR-fyOff)*(double)unit));
        !           341: 
        !           342:     hdcMem = CreateCompatibleDC (hdc);
        !           343:     if (hdcMem) {
        !           344:         hbitmap = CreateCompatibleBitmap (hdc, (int)(fWidth), (int)(fHeight));
        !           345:         if (hbitmap) {
        !           346:             hbitmapOld = SelectObject (hdcMem, hbitmap);
        !           347:             BitBlt (hdcMem, 0, 0, (int)(fWidth), (int)(fHeight), NULL, 0, 0, WHITENESS);
        !           348:             hfontOld = SelectObject (hdcMem, hfont);
        !           349: 
        !           350:             SetTextAlign (hdcMem, TA_LEFT | TA_BASELINE);
        !           351:             if (TextOut (hdcMem, (int)(xML-fxOff), (int)(yML-fyOff), (LPSTR)&glyph, 1)) {
        !           352: 
        !           353: 
        !           354:                                /*
        !           355:                 // Just for debugging, lets mark some special pixels
        !           356:                        SetPixel (hdcMem, (int)(xML-fxOff), (int)(yML-fyOff), 0x808080); // Base Lft
        !           357:                        SetPixel (hdcMem, (int)(xTL-fxOff), (int)(yTL-fyOff), 0x808080); // Top Left
        !           358:                        SetPixel (hdcMem, (int)(xTR-fxOff), (int)(yTR-fyOff), 0x808080); // Top Right
        !           359:                        SetPixel (hdcMem, (int)(xBL-fxOff), (int)(yBL-fyOff), 0x808080); // Btm Left
        !           360:                        SetPixel (hdcMem, (int)(xBR-fxOff), (int)(yBR-fyOff), 0x808080); // Btm Right
        !           361:                        SetPixel (hdcMem, (int)(xML-fxOff), (int)(yML-fyOff), 0x808080); // Base Lft
        !           362:                        SetPixel (hdcMem, (int)(xMR-fxOff), (int)(yMR-fyOff), 0x808080); // Base Rt
        !           363:                 */
        !           364: 
        !           365:                 CircleBlt(hdc, margin, margin,
        !           366:                     rectChar.right-rectChar.left, rectChar.bottom-rectChar.top,
        !           367:                     hdcMem, 0, 0, (int)(fWidth), (int)(fHeight), SRCPAINT);
        !           368: 
        !           369:             } else {
        !           370:                 MessageBox (GetFocus(),
        !           371:                        "Unable to perform TextOut", "DisplayGlyph", MB_OK);
        !           372:             }
        !           373:             SelectObject (hdcMem, hbitmapOld);
        !           374:             SelectObject (hdcMem, hfontOld);
        !           375:             DeleteObject (hbitmap);
        !           376:         } else {
        !           377:             MessageBox (GetFocus(), "Unable To create Bitmap", "DisplayGlyph", MB_OK);
        !           378:         }
        !           379:         DeleteDC (hdcMem);
        !           380:     } else {
        !           381:         MessageBox (GetFocus(), "Unable to create DC", "DisplayGlyph", MB_OK);
        !           382:     }
        !           383: 
        !           384:     hfontTmp = CreateFont(14, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, VARIABLE_PITCH | FF_SWISS, "");
        !           385: 
        !           386:     if (hfontTmp) {
        !           387:         hfontOld = SelectObject (hdc, hfontTmp);
        !           388:         x = rect.right + 10;
        !           389:         GetTextMetrics (hdc, &tm);
        !           390: 
        !           391:         y = tm.tmHeight + tm.tmExternalLeading;
        !           392: 
        !           393:         y += tm.tmHeight + tm.tmExternalLeading;
        !           394:         wsprintf (szText, "Character = '%c' %u (0x%X)", (char)glyph, (int)glyph, (int)glyph);
        !           395:         TextOut (hdc, x, y, szText, lstrlen(szText));
        !           396: 
        !           397:         y += tm.tmHeight + tm.tmExternalLeading;
        !           398:         wsprintf (szText, "CharWidth = %i", cWidth);
        !           399:         TextOut (hdc, x, y, szText, lstrlen(szText));
        !           400: 
        !           401:                // ABC Width - Eventually, I want to 'draw' this into the character
        !           402:                // cell, but for now, this at least makes the information easily
        !           403:                // available:
        !           404: #if defined (TT_AVAILABLE)
        !           405:         y += tm.tmHeight + tm.tmExternalLeading;
        !           406:         wsprintf (szText, "A|B|C = %i | %u | %i", abc.abcA, abc.abcB, abc.abcC);
        !           407:         TextOut (hdc, x, y, szText, lstrlen(szText));
        !           408: #endif
        !           409: 
        !           410:         y += tm.tmHeight + tm.tmExternalLeading;
        !           411:         wsprintf (szText, "CharExtentW = %i", cExtentW);
        !           412:         TextOut (hdc, x, y, szText, lstrlen(szText));
        !           413: 
        !           414:         y += tm.tmHeight + tm.tmExternalLeading;
        !           415:         wsprintf (szText, "CharExtentH = %i", cExtentH);
        !           416:         TextOut (hdc, x, y, szText, lstrlen(szText));
        !           417: 
        !           418:                // These are for some values I was using to debug the character
        !           419:                // cell rotation calculation:
        !           420: 
        !           421:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           422:         //wsprintf (szText, "(%i,%i) : (%i,%i) [%i]", (int)xTL, (int)yTL, (int)xTR, (int)yTR,(int)(((double)lf.lfEscapement/10.0)*10));
        !           423:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           424: 
        !           425:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           426:         //wsprintf (szText, "(%i,%i) : (%i,%i)", (int)xML, (int)yML, (int)xMR, (int)yMR);
        !           427:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           428: 
        !           429:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           430:         //wsprintf (szText, "(%i,%i) : (%i,%i)", (int)xBL, (int)yBL, (int)xBR, (int)yBR);
        !           431:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           432: 
        !           433:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           434:         //wsprintf (szText, "fAng = %i", (int)(fAng));
        !           435:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           436: 
        !           437:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           438:         //wsprintf (szText, "fHa = %i", (int)(fHa));
        !           439:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           440: 
        !           441:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           442:         //wsprintf (szText, "fHb = %i", (int)(fHb));
        !           443:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           444: 
        !           445:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           446:         //wsprintf (szText, "fWa = %i", (int)(fWa));
        !           447:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           448: 
        !           449:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           450:         //wsprintf (szText, "fWb = %i", (int)(fWb));
        !           451:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           452: 
        !           453:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           454:         //wsprintf (szText, "fWd = %i", (int)(fWd));
        !           455:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           456: 
        !           457:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           458:         //wsprintf (szText, "fHd = %i", (int)(fHd));
        !           459:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           460: 
        !           461:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           462:         //wsprintf (szText, "fHeight = %i", (int)(fHeight));
        !           463:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           464: 
        !           465:         //y += tm.tmHeight + tm.tmExternalLeading;
        !           466:         //wsprintf (szText, "fWidth = %i", (int)(fWidth));
        !           467:         //TextOut (hdc, x, y, szText, lstrlen(szText));
        !           468: 
        !           469:         SelectObject (hdc, hfontOld);
        !           470:         DeleteObject (hfontTmp);
        !           471:     }
1.1       root      472: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.