Category : OS/2 Files
Archive   : VECTFONT.ZIP
Filename : VF14.C

 
Output of file : VF14.C contained in archive : VECTFONT.ZIP
/*--------------------------------------
VF14.C -- Clipped wavy spline curves
--------------------------------------*/

#define INCL_GPI
#include
#include
#include "vectfont.h"

VOID Display_Wavy (HPS hps, LONG cxClient, LONG cyClient)
{
static CHAR szText[] = "Hello!" ;
static LONG cbText = sizeof szText - 1 ;
static LONG lColors[] = { CLR_BLUE, CLR_GREEN, CLR_CYAN, CLR_RED,
CLR_PINK, CLR_YELLOW, CLR_WHITE } ;
INT i ;
POINTL ptl, aptl[8] ;

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_BLACK) ;

GpiBeginPath (hps, ID_PATH) ;
GpiCharStringAt (hps, &ptl, cbText, szText) ; // Text string
GpiEndPath (hps) ;

GpiSetClipPath (hps, ID_PATH, SCP_AND | SCP_ALTERNATE) ;

for (i = 0 ; i < 14 ; i++)
{
aptl[0].x = 0 ;
aptl[0].y = i * cyClient / 14 ;

aptl[1].x = cxClient / 3 ;
aptl[1].y = min (cyClient, 2 * i * cyClient / 14) ;

aptl[2].x = 2 * cxClient / 3 ;
aptl[2].y = max (0L, (2 * i - 14) * cyClient / 14) ;

aptl[3].x = cxClient ;
aptl[3].y = i * cyClient / 14 ;

aptl[4].x = cxClient ;
aptl[4].y = (i + 1) * cyClient / 14 ;

aptl[5].x = 2 * cxClient / 3 ;
aptl[5].y = max (0L, (2 * (i + 1) - 14) * cyClient / 14) ;

aptl[6].x = cxClient / 3 ;
aptl[6].y = min (cyClient, 2 * (i + 1) * cyClient / 14) ;

aptl[7].x = 0 ;
aptl[7].y = (i + 1) * cyClient / 14 ;

GpiSetColor (hps, lColors[i % 7]) ;
GpiBeginArea (hps, BA_BOUNDARY | BA_ALTERNATE) ;

GpiMove (hps, aptl) ; // Splines
GpiPolySpline (hps, 3L, aptl + 1) ;
GpiLine (hps, aptl + 4) ;
GpiPolySpline (hps, 3L, aptl + 5) ;
GpiLine (hps, aptl) ;

GpiEndArea (hps) ;
}
GpiSetCharSet (hps, LCID_DEFAULT) ; // Clean up
GpiDeleteSetId (hps, LCID_MYFONT) ;
}


  3 Responses to “Category : OS/2 Files
Archive   : VECTFONT.ZIP
Filename : VF14.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/