Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>introduction</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
INTRODUCTION

  This module contain a series of video functions which concern the screen
  either directly or indirectly.  It also contains functions for deciding
  the type of screen adapters CGA, EGA and monochrome graphics (Hercules).

  Color attributes, which are designated in the syntax with <attr> will be
  used within this module.  <attr> can be specified in three ways:

  1.  A numerical value, which corresponds to a combined
      color attribute (e.g., 7).

  2.  A string in the form of "nn/nn", which denotes two
      numerical values (e.g., "7/0").

  3.  A string in the form of "cc/cc", which denotes two
      attributes in the conventional Clipper form (e.g., "W/N").

  In many functions the attribute is supplied as a combined numerical value.
  The attributes for the foreground and background are then resolved into
  one combined value.  The color attributes are constructed as follows:

  Bit           8765         4321
  Attribute     *RGB         +RGB
                ----         ----
             Foreground   Background

  Each attribute consists of four bits, which corresponds to a value in
  the range 0 to 15.  When combined, this will result in a total of
  16 * 16 (256) different values in the range from 0 to 255.  These numerical
  values can be converted with NTOCOLOR() into the format "nn/nn" as
  conventionally used in Clipper.  However, it will also be possible to
  change these combined attribute values directly.  Some examples, which
  use bit manipulation functions from other chapters, are given below.

            NUMOR(<attr>,128)                   && Flashing on
            NUMAND(<attr>,127)                  && Flashing off
            NUMXOR(<attr>,128)                  && Switch over flashing
            NUMOR(<attr>,8)                     && High intensity on
            NUMAND(<attr>,247)                  && High intensity off
            NUMXOR(<attr>,8)                    && Switch over high intensity

  An argument <char> which always represents a single character can also
  be used with many functions.  This argument can also be denoted in two
  different ways.

  1.  The numeric ASCII code of the desired symbol (e.g., 58).
  2.  Alphanumeric as character (e.g., ":").

  This negates the need to convert special characters with CHR().

  CLEARA and CLEARB

  Some of the Clipper Tools One functions use a default attribute and
  character to erase lines or areas of the screen.  The attribute is called
  CLEARA in this description, and the character is designated as CLEARB.
  Both CLEARA and CLEARB can be determined and set with the aid of the
  appropriate functions.  CLEARA has the attribute "W/N" as standard and
  CLEARB is preset to CHR(255).  When erasing, the background is immediately
  filled with the appropriate color by using CLEARB.

  The functions for setting up and determining the standard values for
  CLEARA and CLEARB are:

            GETCLEARA()
            GETCLEARB()
            SETCLEARA()
            SETCLEARB()

  The following functions use these default values:

            CLEAREOL()
            CLEARWIN()
            COLORREPL()
            COLORWIN()

  However, it is possible to cancel out the default values by specifying
  the appropriate argument (<attr> or <char>).



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