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

1.1       root        1: /*---------------------------------
                      2:    VF09.C -- Font with Drop Shadow
                      3:   ---------------------------------*/
                      4: 
                      5: #define INCL_GPI
                      6: #include <os2.h>
                      7: #include "vectfont.h"
                      8: 
                      9: VOID Display_DropShadow (HPS hps, LONG cxClient, LONG cyClient)
                     10:      {
                     11:      static CHAR szText[] = "Hello!" ;
                     12:      static LONG cbText = sizeof szText - 1 ;
                     13:      POINTL      ptl ;
                     14: 
                     15:      CreateVectorFont (hps, LCID_MYFONT, "Tms Rmn Italic") ;
                     16:      GpiSetCharSet (hps, LCID_MYFONT) ;
                     17:      ScaleFontToBox (hps, cbText, szText, cxClient, cyClient) ;
                     18:      QueryStartPointInTextBox (hps, cbText, szText, &ptl) ;
                     19: 
                     20:      GpiCharStringAt (hps, &ptl, cbText, szText) ;     // Shadow
                     21: 
                     22:      ptl.x -= 12 ;       // 1/6 inch
                     23:      ptl.y += 12 ;
                     24: 
                     25:      GpiSetColor (hps, CLR_BACKGROUND) ;
                     26:      GpiCharStringAt (hps, &ptl, cbText, szText) ;     // Text string
                     27: 
                     28:      GpiBeginPath (hps, ID_PATH) ;
                     29:      GpiCharStringAt (hps, &ptl, cbText, szText) ;     // Outline
                     30:      GpiEndPath (hps) ;
                     31: 
                     32:      GpiSetColor (hps, CLR_NEUTRAL) ;
                     33:      GpiStrokePath (hps, ID_PATH, 0L) ;
                     34: 
                     35:      GpiSetCharSet (hps, LCID_DEFAULT) ;               // Clean up
                     36:      GpiDeleteSetId (hps, LCID_MYFONT) ;
                     37:      }

unix.superglobalmegacorp.com

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