|
|
1.1 root 1: /*----------------------------------------------------------
2: VF02.C -- Display vector font stretched to client window
3: ----------------------------------------------------------*/
4:
5: #define INCL_GPI
6: #include <os2.h>
7: #include "vectfont.h"
8:
9: VOID Display_Stretch (HPS hps, LONG cxClient, LONG cyClient)
10: {
11: static CHAR szText[] = "Hello!" ;
12: static LONG cbText = sizeof szText - 1 ;
13: POINTL ptl ;
14:
15: // Create font, select, and scale
16:
17: CreateVectorFont (hps, LCID_MYFONT, "Tms Rmn Italic") ;
18: GpiSetCharSet (hps, LCID_MYFONT) ;
19: ScaleFontToBox (hps, cbText, szText, cxClient, cyClient) ;
20: QueryStartPointInTextBox (hps, cbText, szText, &ptl) ;
21:
22: GpiCharStringAt (hps, &ptl, cbText, szText) ; // Display text
23:
24: GpiSetCharSet (hps, LCID_DEFAULT) ; // Clean up
25: GpiDeleteSetId (hps, LCID_MYFONT) ;
26: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.