Annotation of pmsdk/samples/vectfont/vf11.c, revision 1.1.1.1

1.1       root        1: /*-----------------------------------------------------
                      2:    VF11.C -- Neon font using geometrically-thick lines
                      3:   -----------------------------------------------------*/
                      4: 
                      5: #define INCL_GPI
                      6: #include <os2.h>
                      7: #include "vectfont.h"
                      8: 
                      9: VOID Display_Neon (HPS hps, LONG cxClient, LONG cyClient)
                     10:      {
                     11:      static CHAR szText[] = " Neon " ;
                     12:      static LONG cbText = sizeof szText - 1 ;
                     13:      static LONG lForeColor[] = { CLR_DARKRED, CLR_DARKRED, CLR_RED,
                     14:                                   CLR_RED,     CLR_WHITE,   CLR_WHITE };
                     15:      static LONG lBackColor[] = { CLR_BLACK,   CLR_DARKRED, CLR_DARKRED,
                     16:                                   CLR_RED,     CLR_RED,     CLR_WHITE };
                     17:      static LONG lWidth[] = { 34, 28, 22, 16, 10, 4 } ;
                     18: 
                     19:      INT         iIndex ;
                     20:      POINTL      ptl ;
                     21: 
                     22:      CreateVectorFont (hps, LCID_MYFONT, "Tms Rmn Italic") ;
                     23:      GpiSetCharSet (hps, LCID_MYFONT) ;
                     24:      ScaleFontToBox (hps, cbText, szText, cxClient, cyClient) ;
                     25:      QueryStartPointInTextBox (hps, cbText, szText, &ptl) ;
                     26: 
                     27:      ColorClient (hps, cxClient, cyClient, CLR_BLACK) ;
                     28: 
                     29:      for (iIndex = 0 ; iIndex < 6 ; iIndex++)
                     30:           {
                     31:           GpiBeginPath (hps, ID_PATH) ;
                     32:           GpiCharStringAt (hps, &ptl, cbText, szText) ;     // Text out
                     33:           GpiEndPath (hps) ;
                     34: 
                     35:           GpiSetColor (hps, lForeColor[iIndex]) ;
                     36:           GpiSetBackColor (hps, lBackColor[iIndex]) ;
                     37:           GpiSetBackMix (hps, BM_OVERPAINT) ;
                     38:           GpiSetPattern (hps, PATSYM_HALFTONE) ;
                     39:           GpiSetLineWidthGeom (hps, lWidth[iIndex]) ;
                     40: 
                     41:           GpiStrokePath (hps, ID_PATH, 0L) ;           // Stroke path
                     42:           }
                     43:      GpiSetCharSet (hps, LCID_DEFAULT) ;               // Clean up
                     44:      GpiDeleteSetId (hps, LCID_MYFONT) ;
                     45:      }

unix.superglobalmegacorp.com

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