home *** CD-ROM | disk | FTP | other *** search
/ gondwana.ecr.mu.oz.au/pub/ / Graphics.tar / Graphics / VOGLE.ZIP / VOGLE / DRIVERS / IBMPC / VEGA_TEX.C < prev    next >
C/C++ Source or Header  |  2000-02-11  |  1KB  |  61 lines

  1. #include    "vogle.h"
  2.  
  3.  
  4. #define        SMALL_CHARS        0
  5. #define        LARGE_CHARS        1
  6.  
  7. static        int        vega_size = LARGE_CHARS;
  8. extern        unsigned    _cur_color;
  9.  
  10. void
  11. vega_string(str)
  12.     char    *str;
  13. {
  14.     char    *p;
  15.     register    int        x, y, w;
  16.  
  17.     x = vdevice.cpVx;
  18.     y = vdevice.sizeSy - vdevice.cpVy - (int) vdevice.hheight;
  19.     w = (int)vdevice.hwidth;
  20.     for (p = str; *p; p++) {
  21.         vegachar(x, y, *p, _cur_color, vega_size);
  22.         x += w;
  23.         }
  24.     vdevice.cpVx = x;
  25. }
  26.  
  27. void
  28. vega_char(c)
  29.     char    c;
  30. {
  31.     vegachar(vdevice.cpVx, vdevice.sizeSy - vdevice.cpVy - (int)vdevice.hheight, c, _cur_color, vega_size);
  32.     /*vdevice.cpVx += (int)vdevice.hwidth;*/
  33. }
  34.  
  35. vegachar(x, y, c, n, size)
  36. int            x, y, c, n, size;
  37. {
  38.     if (size == LARGE_CHARS) egalchar(x, y, c, n);
  39.     else egaschar(x, y, c, n);
  40. }
  41.  
  42. vega_font(name)
  43.     char *name;
  44. {
  45.     if (strcmp(name, "small") == 0) {
  46.         vega_size = SMALL_CHARS;
  47.         vdevice.hwidth = 8.0;
  48.         vdevice.hheight = 8.0;
  49.     } else if (strcmp(name, "large") == 0) {
  50.         vega_size = LARGE_CHARS;
  51.         vdevice.hwidth = 8.0;
  52.         vdevice.hheight = 14.0;
  53.     } else {
  54.         vega_size = LARGE_CHARS;
  55.         vdevice.hwidth = 8.0;
  56.         vdevice.hheight = 14.0;
  57.         return (0);
  58.     }
  59.     return (1);
  60. }
  61.