Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Flipper 6.0 Help File - <b>shad_table()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
SHAD_TABLE()
   Sets the shade table for printing.

   Syntax
         SHAD_TABLE(nColor,aShadePattern[8 or 3])

   Arguments
         nColor      Specifies the color to set the pattern for.
         aShadPattern[8 or 3]  Sets the pattern for the color. Use an 8
                               element array for most printers, and a 3
                               element array for the HP PaintJet or
                               PaintJet XL.

   Returns
         None

   Description
         When sending color screens to monochrome printers, you must have a
         way to correlate different colors with what will be printed. The
         easiest is to choose a background color, usually black, which will
         not be printed and let all other colors be printed out. This is the
         default output style. PRT_COLORS() allows you to specify which colors
         will be printed and which ones will not.

         Another approach is to use a different shading pattern for each
         color. A default shading pattern is provided:

                +--------------------------------------------+
                |Color| Shading Pattern                      |
                ------+--------------------------------------|
                |  0  |255  255  255  255  255  255  255  255|
                |  1  |255   85  255   85  255   85  255   85|
                |  2  |255   17  255   17  255   17  255   17|
                |  3  |255    0  255    0  255    0  255    0|
                |  4  |119  238  119  238  119  238  119  238|
                |  5  |129   66   36  255   24   36   66  129|
                |  6  | 17   17   17  255   17   17   17  255|
                |  7  |136   68   34   17  136   68   34   17|
                |  8  | 17   34   68  136   17   34   68  136|
                |  9  |240   15  240   15  240   15  240   15|
                | 10  | 17   17   17   17   17   17   17   17|
                | 11  |153   68  153   68  153   68  153   68|
                | 12  | 17   68   17   68   17   68   17   68|
                | 13  | 17    0   68    0   17    0   68    0|
                | 14  | 16    1   16    1   16    1   16    1|
                | 15  |  0    0    0    0    0    0    0    0|
                +--------------------------------------------+

         As a color is read from the screen, it is printed depending on
         whether the bit for the shading pattern is set or not.

         The nShade parameter of the PRT_OPTS() function determines whether
         the shading will occur or not,  if nShade is non-zero, the pattern
         mode is selected. In this mode 16 color shading patterns are
         employed. Else, if 0, (the default) monochrome output is generated
         and all colors set to 1 with PRT_COLORS() will be printed in solid
         black.

         The nWhiteBkgnd parameter of the PRT_OPTS() function determines
         whether the shade pattern table above will be printed as is -
         White-On-Black shading - or reversed - Black-On-White shading. Zero
         selects White-On-Black (the default) and non-zero selects Black-On-
         White, the inverse.

         To modifiy the above pattern table, enter the color number to modify
         and an eight byte array representing the bit pattern.

         The default bit pattern for color 1 when the pattern is expanded into
         it's bit pattern is:

       11111111.10000101.11111111.10000101.11111111.10000101.11111111.10000101

   For HP Paint Jet Printers:

         This table is used differently for the HP PaintJet and PaintJet XL
         printers. In the PaintJet system, each color has 3 values, one each
         for red, green, and blue (RGB). A table in your PaintJet Users Guide,
         Raster Graphics Chapter, has a complete table of all the different
         possible RGB combinations. You can set a palette color number to one
         of these 3-number combinations, which is why a 3 element array is
         used. The following lists the default color table for the PaintJet:
                            +----------------+
                            |Default PaintJet|
                            |  Shade Table   |
                            |----------------|
                            | 0| 90, 88, 85  |
                            | 1|  5,  6, 36  |
                            | 2| 30, 53, 16  |
                            | 3| 12, 39, 73  |
                            | 4| 53,  8, 14  |
                            | 5| 65, 19, 43  |
                            | 6| 89, 85, 19  |
                            | 7|  4,  4,  6  |
                            | 8| 90, 88, 85  |
                            | 9|  5,  6, 36  |
                            |10| 30, 53, 16  |
                            |11| 12, 39, 73  |
                            |12| 53,  8, 14  |
                            |13| 65, 19, 43  |
                            |14| 89, 85, 19  |
                            |15|  4,  4,  6  |
                            +----------------+

See Also: COLR_TABLE() PRT_COLORS() PRT_OPTS()

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