-
Notifications
You must be signed in to change notification settings - Fork 0
/
VF10.C
44 lines (34 loc) · 1.25 KB
/
VF10.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/*----------------------------
VF10.C -- Solid block font
----------------------------*/
#define INCL_GPI
#include <os2.h>
#include "vectfont.h"
VOID Display_Block (HPS hps, LONG cxClient, LONG cyClient)
{
unsigned char szText[] = " Block " ;
static LONG cbText = sizeof szText - 1 ;
INT i ;
POINTL ptl ;
CreateVectorFont (hps, LCID_MYFONT, "Tms Rmn Italic") ;
GpiSetCharSet (hps, LCID_MYFONT) ;
ScaleFontToBox (hps, cbText, szText, cxClient, cyClient) ;
QueryStartPointInTextBox (hps, cbText, szText, &ptl) ;
ColorClient (hps, cxClient, cyClient, CLR_WHITE) ;
GpiSetColor (hps, CLR_DARKGREEN) ;
for (i = 0 ; i < 18 ; i++)
{
GpiCharStringAt (hps, &ptl, cbText, szText) ; // Block
ptl.x -= 1 ;
ptl.y -= 1 ;
}
GpiSetColor (hps, CLR_GREEN) ;
GpiCharStringAt (hps, &ptl, cbText, szText) ; // Text string
GpiBeginPath (hps, ID_PATH) ;
GpiCharStringAt (hps, &ptl, cbText, szText) ; // Outline
GpiEndPath (hps) ;
GpiSetColor (hps, CLR_DARKGREEN) ;
GpiStrokePath (hps, ID_PATH, 0L) ;
GpiSetCharSet (hps, LCID_DEFAULT) ; // Clean up
GpiDeleteSetId (hps, LCID_MYFONT) ;
}