-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathVF04.C
40 lines (33 loc) · 1.34 KB
/
VF04.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
/*------------------------------------------
VF04.C -- Display eight character angles
------------------------------------------*/
#define INCL_GPI
#include <os2.h>
#include <stdio.h>
#include "vectfont.h"
VOID Display_CharAngle (HPS hps, LONG cxClient, LONG cyClient)
{
static GRADIENTL agradl[8] = { {100, 0}, {100, 100},
{0, 100}, {-100, 100},
{-100, 0}, {-100, -100},
{0, -100}, {100, -100} } ;
CHAR szBuffer[40] ;
INT iIndex ;
POINTL ptl ;
// Create Helvetica font
CreateVectorFont (hps, LCID_MYFONT, "Helv") ;
GpiSetCharSet (hps, LCID_MYFONT) ;
ScaleVectorFont (hps, 200, 200) ;
ptl.x = cxClient / 2 ; // Center of client window
ptl.y = cyClient / 2 ;
for (iIndex = 0 ; iIndex < 8 ; iIndex++)
{
GpiSetCharAngle (hps, agradl + iIndex) ; // Char angle
GpiCharStringAt (hps, &ptl,
(LONG) sprintf (szBuffer, " Character Angle (%ld,%ld)",
agradl[iIndex].x, agradl[iIndex].y),
(PCCH) szBuffer) ;
}
GpiSetCharSet (hps, LCID_DEFAULT) ; // Clean up
GpiDeleteSetId (hps, LCID_MYFONT) ;
}