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

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

unix.superglobalmegacorp.com

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