Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ Language Reference - fg_box_t http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
   fg_box_t

   Type  for coordinate box. There are four coordinate variables  in  the
   box, FG_X1, FG_Y1, FG_X2, FG_Y2. Boxes must be normalized before being
   passed to the graphics functions. A normalized box is one whose  FG_X1
   coordinate  is  less than or equal to the FG_X2 coordinate  and  FG_Y1
   coordinate  is  less than or equal to the FG_Y2 coordinate.  In  other
   words,  the first point of a box is always the lower left  corner  and
   the second is always the upper right corner.

    fg_pbox_t           Pointer to a box.
    fg_const_pbox_t     Pointer to a box that will never be changed.
    fg_line_t           The type for a line. Lines use  the  same
                          constants for  indexes that boxes do,  but
                          have no need to be  normalized  before
                          being passed to the functions.

    fg_color_t          The type for a color.
    fg_pline_t          Pointer to a line.
    fg_const_pline_t    Pointer to a line that will never be changed.
    fg_handle_t         A "handle" for a saved area of the screen.  See
                          fg_save and fg_restore .

    Constants_Defined_by_FG

   Constants are indicated by upper case names. These are defined in  the
   header  file fg.h. They should always be referred to by the  name  and
   never the value that the macro in the header file expands to.

   They are subject to change in future versions of the graphics package.

   Graphics Display Adaptors
   Values  returned  from fg_init (see description of  fg_init  for  more
   information)  The global fg_display is set to the same value.  fg_init
   will attempt to determine which graphics device is connected. This can
   be overridden at run time by using the environment variable FG_DISPLAY
   and setting it to one of the values below. E.g SET FG_DISPLAY=HERCFULL

   NULL           All graphics are routed to bit bucket
   CGAHIRES       IBM CGA in 640 x 200 x 2 color mode
   CGAMEDRES      IBM CGA in 320x200 x 4 color mode
   EGACOLOR       IBM EGA with regular color display in
                                 640 x 200 x 16 color mode
   EGAECD         IBM EGA with enhanced color display in
                                 640 x 350 x 16 color mode
   EGAMONO        IBM EGA with IBM monochrome monitor in
                                 640 x 350 x 4 color mode
   EVGAHIRES      Everex EVGA board in 800 x 600 x 16 color mode.
   HERCFULL       Hercules monochrome in 2 display pages x 2 color mode
   HERCHALF       Hercules monochrome in 1 display page x 2 colors
   HERC           Hercules monochrome, fg_init to determine
                                 whether 1 or 2 pages
   VGA11          IBM VGA in 640 x 480 x 2 color mode (0x11)
   VGA12          IBM VGA in 640 x 480 x 16 color mode (0x12)
   VGA13          IBM VGA in mode 320 x 200 x 256 color mode (0x13)
   VEGAVGAHIRES   Video 7 Vega VGA board in 800 x 600 x 16 color mode
   TOSHIBA        TOSHIBA 3100 in 640 x 400 x 2 color mode
   8514A          IBM 8514A display adaptor.


   Box and Line Indexes
   FG_X1, FG_Y1, FG_X2, FG_Y2
   Used  as  indexes into boxes and lines, as in  fg.displaybox.  [FG_X1]
   refers to the x coordinate of the left side of the display.

   The  diagram  above  shows the relationship of  the  FG_X?  and  FG_Y?
   indices  to  the coordinates of a box or line within  Flash_Graphics.
   These  constants should be used to put data into the fg_box  and  line
   arrays rather than the absolute values to avoid problems with  display
   adapters that may use a different coordinate system.

   Masks
   Mask constants are passed to nearly all functions to indicate the bits
   on which to perform the desired operations. The mask only has  utility
   on  boards that support more than two colors. For boards like the  EGA
   which  supports  16 simultaneous colors in the  high  resolution  mode
   there are 4 bits in the mask that may be utilized by the programmer in
   some fashion. Whatever the board, the significant mask bits are always
   packed into the low order bits.

   In  most  cases  the application will want to write  to  all  the  bit
   planes.  Using a value of ~0 will ensure this. Controlling  which  bit
   planes the functions operate on is useful for:

   1.If  you have 2 planes (2bits/pixel), you can draw a different  image
   on  each  plane.  By then changing the color map, the  planes  can  be
   independently turned on or off, creating an animation effect.

   2.The  cursor  could  be  written to its own  plane,  thus  making  it
   independent of the other graphics.

   Writing Modes
   One of the following is passed to nearly all functions to indicate the
   type of operation to perform on the screen.

   FG_MODE_XOR    Mode value for XORing colors on to the screen.
   FG_MODE_SET    Mode value for setting colors on to the screen.

   Types Of Lines
   One of the following values is passed to the line drawing functions to
   indicate the type of line to draw.

   FG_LINE_SOLID
   FG_LINE_LONG_DASH
   FG_LINE_MEDIUM_DOTTED
   FG_LINE_DASH_DOTTED
   FG_LINE_MEDIUM_DASHED
   FG_LINE_DASH_W_2_DOTS
   FG_LINE_SHORT_DASH
   FG_LINE_DENSE_DOTTED
   FG_LINE_SPARSE_DOTTED
   FG_LINE_USER_DEFINED

   The  last of these line types, FG_USER_DEFINED, is undefined by  Flash
   Graphics   and  can  be  defined  by  the  application  program   with
   fg_setlinepattern.

   The value FG_LINE_MAX is the maximum number of line types defined at
   one time.

   Available Colors
   This  is the value that must be passed to functions as  arguments  for
   the  color of lines, dots, boxes, etc. Due to the variety of  graphics
   boards supported no one board supplies all the following colors.  Some
   supply only two, Flash_Graphics is defined such that there will allows
   be at least two of the same colors available on all boards supported.

   These values are the defaults. If you change the palette (color  map),
   the  names  will no longer match the colors that they  provide.  If  a
   color  is  not available, it will expand to -1. These values  are  not
   valid before fg_init is called.

   FG_BLACK       Available on all systems
   FG_BLUE
   FG_GREEN
   FG_CYAN
   FG_BLUE_GREEN       Blue-green - same as cyan.
   FG_RED
   FG_MAGENTA
   FG_PURPLE           Purple - same as magenta
   FG_YELLOW
   FG_WHITE            Available on all systems
   FG_GRAY
   FG_LIGHT_BLUE
   FG_LIGHT_GREEN
   FG_LIGHT_CYAN
   FG_LIGHT_BLUE_GREEN Light blue-green = light cyan
   FG_LIGHT_RED
   FG_LIGHT_MAGENTA
   FG_BROWN
   FG_LIGHT_WHITE
   FG_HIGHLIGHT        Normally  an  intense  white.  This  is   always
                       available but may be the same as FG_WHITE
   FG_BLINK            Blinking white

   Public Structure
   A predefined structure contains information useful to the  application
   program. The structure is fg, the various members are defined below.
   Values of these members are garbage until fg_init is called.

   They  are  garbage  after  fg_term() is  called.  The  values  (except
   fg.activepage  and  fg.displaypage) never change between  fg_init  and
   fg_term- none of them must ever be modified by the application.


Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson