home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 9 / 09.iso / l / l217 / 2.ddi / INCLUDE / BGI.PRE next >
Encoding:
Text File  |  1990-03-26  |  4.8 KB  |  170 lines

  1.  
  2. /************************************************************************
  3. *************************************************************************
  4.  
  5.              Graphic constants
  6.  
  7.         Include file: "GrapDecl.PRO"
  8.  
  9.  
  10. *************************************************************************
  11. *************************************************************************/
  12.  
  13. Constants
  14. /* graphresult error return codes */
  15.   grOk              =   0
  16.   grNoInitGraph          =  -1
  17.   grNotDetected          =  -2
  18.   grFileNotFound    =  -3
  19.   grInvalidDriver    =  -4
  20.   grNoLoadMem         =  -5
  21.   grNoScanMem         =  -6
  22.   grNoFloodMem          =  -7
  23.   grFontNotFound    =  -8
  24.   grNoFontMem          =  -9
  25.   grInvalidMode          = -10
  26.   grError        = -11   /* generic error */
  27.   grIOerror         = -12
  28.   grInvalidFont          = -13
  29.   grInvalidFontNum      = -14
  30.   grInvalidDeviceNum     = -15
  31.  
  32.  
  33.   % Graphics drivers
  34.   detect        =   0    /* requests autodetection */        
  35.   cga            =   1
  36.   mcga            =   2
  37.   ega            =   3
  38.   ega64            =   4
  39.   egamono        =   5
  40.   reserved        =   6
  41.   hercmono        =   7
  42.   att400        =   8
  43.   vga            =   9
  44.   pc3270        =  10
  45.  
  46.  
  47.   % graphics modes for each driver
  48.   cgac0      = 0  /* 320x200 color palette 0: red, yellow, green, 1 page */
  49.   cgac1      = 1  /* 320x200 color palette 1: cyan, magenta, white, 1 pg */
  50.   cgac2      = 2  /* 320x200 color palette 2:                */
  51.   cgac3      = 3  /* 320x200 color palette 3:                */
  52.   cgahi      = 4  /* 640x200 1 page                        */
  53.   mcgac0     = 0  /* 320x200 color palette 0: red, yellow, green, 1 page */
  54.   mcgac1     = 1  /* 320x200 color palette 1: cyan, magenta, white, 1 pg */
  55.   mcgac2     = 2  /* 320x200 color palette 2:                */
  56.   mcgac3     = 3  /* 320x200 color palette 3:                */
  57.   mcgamed    = 4  /* 640x200 1 page                        */
  58.   mcgahi     = 5  /* 640x480 2 color 1 page                    */
  59.   egalo      = 0  /* 640x200 4 pages                        */
  60.   egahi      = 1  /* 640x350 16 color 2 pages                */
  61.   ega64lo    = 0  /* 640x200 16 color 1 page                    */
  62.   ega64hi    = 1  /* 640x350 4 color     1 page                    */
  63.   egamonohi  = 3  /* 640x350 64k on card, 1 page - 256k on card, 4 pages */
  64.   hercmonohi = 0  /* 720x348 2 pages                        */
  65.   att400c0   = 0  /* 320x200 color palette 0: red, yellow, green, 1 page */
  66.   att400c1   = 1  /* 320x200 color palette 1: cyan, magenta, white, 1 pg */
  67.   att400c2   = 2  /* 320x200 color palette 2:                */
  68.   att400c3   = 3  /* 320x200 color palette 3:                */
  69.   att400med  = 4  /* 640x200 1 page                        */
  70.   att400hi   = 5  /* 640x400 1 page                        */
  71.   vgalo      = 0  /* 640x200 16 color 4 pages                */
  72.   vgamed     = 1  /* 640x350 16 color 2 pages                */
  73.   vgahi      = 2  /* 640x480 16 color 1 page                    */
  74.   vgahi2     = 3  /* 640x480 2 color 1 page                    */
  75.   pc3270hi   = 0  /* 720x350 1 page                        */
  76.  
  77.  
  78.   % Colors for setpalette and setallpalette
  79.   black        =    0     /* dark colors */
  80.   blue        =     1
  81.   green        =    2
  82.   cyan        =    3
  83.   red        =    4
  84.   magenta    =    5
  85.   brown        =    6
  86.   lightgray    =    7
  87.   darkgray    =    8    /* Light colors */
  88.   lightblue    =    9
  89.   lightgreen    =    10
  90.   lightcyan    =    11
  91.   lightred    =    12
  92.   lightmagenta    =    13
  93.   yellow    =    14
  94.   white        =    15
  95.  
  96.  
  97.   % Line styles for get/setlinestyle
  98.   solid_line   =    0
  99.   dotted_line  =     1
  100.   center_line  =     2
  101.   dashed_line  =     3
  102.   userbit_line =     4    /* User defined line style */
  103.  
  104.  
  105.   % Line widths for get/setlinestyle
  106.   norm_width    =    1
  107.   thick_width    =    3
  108.  
  109.  
  110.   % Fonts
  111.   default_font        = 0    /* 8x8 bit mapped font */
  112.   triplex_font        = 1    /* "Stroked" fonts */
  113.   small_font        = 2
  114.   sans_serif_font    = 3
  115.   gothic_font        = 4
  116.  
  117.  
  118.   % Writing direction
  119.   horiz_dir        = 0    /* Left to right */
  120.   vert_dir        = 1    /* Bottom to top */
  121.  
  122.   % Naming of user defined charsize in settextstyle
  123.   user_char_size    = 0    /* User-defined char size */
  124.  
  125.  
  126.   % Fill patterns for get/setfillstyle
  127.   empty_fill        = 0    /* Fills area in background color */
  128.   solid_fill        = 1    /* Fills area in solid fill color */
  129.   line_fill        = 2    /* --- fill */
  130.   ltslash_fill        = 3    /* /// fill */
  131.   slash_fill        = 4    /* /// fill with thick lines */
  132.   bkslash_fill        = 5    /* \\\ fill with thick lines */
  133.   ltbkslash_fill    = 6    /* \\\ fill */
  134.   hatch_fill        = 7    /* Light hatch fill */
  135.   xhatch_fill        = 8    /* Heavy cross hatch fill */
  136.   interleave_fill    = 9    /* Interleaving line fill */
  137.   wide_dot_fill        = 10    /* Widely spaced dot fill */
  138.   close_dot_fill    = 11    /* Closely spaced dot fill */
  139.   user_fill        = 12    /* User defined fill */
  140.  
  141.  
  142.   % BitBlt operators for putimage and writemode
  143.   copy_put        = 0
  144.   xor_put        = 1
  145.   or_put        = 2
  146.   and_put        = 3
  147.   not_put        = 4
  148.  
  149.  
  150.   % Horizontal and vertical justification for settextjustify
  151.   left_text    = 0
  152.   center_text    = 1
  153.   right_text    = 2
  154.  
  155.   bottom_text    = 0
  156.   % center_text    = 1  already defined above
  157.   top_text    = 2
  158.  
  159.  
  160.   % Clipping in a viewport
  161.   clip        = 1
  162.   noclip    = 0
  163.  
  164.  
  165.   % Define some handy constants
  166.   esc        = '\027'
  167.   true        = 1
  168.   false        = 0
  169.   pi        = 3.14159
  170.