Annotation of pmsdk/samples/vectfont/vf12.c, revision 1.1

1.1     ! root        1: /*------------------------------------------------------
        !             2:    VF12.C -- Fading font with various pattern densities
        !             3:   ------------------------------------------------------*/
        !             4: 
        !             5: #define INCL_GPI
        !             6: #include <os2.h>
        !             7: #include "vectfont.h"
        !             8: 
        !             9: VOID Display_Fade (HPS hps, LONG cxClient, LONG cyClient)
        !            10:      {
        !            11:      static CHAR szText[] = "Fade" ;
        !            12:      static LONG cbText = sizeof szText - 1 ;
        !            13:      LONG        lPattern ;
        !            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:      GpiSetBackMix (hps, BM_OVERPAINT) ;
        !            22: 
        !            23:      for (lPattern = 8 ; lPattern >= 1 ; lPattern--)
        !            24:           {
        !            25:           GpiBeginPath (hps, ID_PATH) ;
        !            26:           GpiCharStringAt (hps, &ptl, cbText, szText) ;     // Text out
        !            27:           GpiEndPath (hps) ;
        !            28: 
        !            29:           GpiSetPattern (hps, lPattern) ;
        !            30:           GpiFillPath (hps, ID_PATH, FPATH_ALTERNATE) ;     // Fill path
        !            31: 
        !            32:           ptl.x += 2 ;
        !            33:           ptl.y -= 2 ;
        !            34:           }
        !            35: 
        !            36:      GpiSetPattern (hps, PATSYM_SOLID) ;
        !            37:      GpiSetBackMix (hps, BM_LEAVEALONE) ;
        !            38:      GpiCharStringAt (hps, &ptl, cbText, szText) ;          // Solid
        !            39: 
        !            40:      GpiSetCharSet (hps, LCID_DEFAULT) ;                    // Clean up
        !            41:      GpiDeleteSetId (hps, LCID_MYFONT) ;
        !            42:      }

unix.superglobalmegacorp.com

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