GDDM V3R2 Base Application Programming Guide
Previous topic | Next topic | Contents | Index | Contact z/OS | Library | PDF | BOOK


Colors

GDDM V3R2 Base Application Programming Guide
SC33-0867-01



The numbers you specify for colors in calls such as GSCOL become pen numbers when the output goes to a plotter. On a display unit, this call:


     CALL GSCOL(1);

means that subsequent primitives are to be displayed in blue. On a plotter, it means the primitives are to be plotted with pen number 1. Whether this is blue or some other color depends on what pen has been loaded into the pen holder in position 1. It is the plotter operator's responsibility to ensure that each pen-holder position has a pen of the required color. A suggested scheme is shown in Table 8.


 Table 8. Suggested color scheme for plotter pens
 Pen
 number
          
                       Suggested color
 2-pen plotter  6-pen plotter  8-pen plotter
 1
 2
 3
 4
 5
 6
 7
 8
 Black
 Red
                    
                    
                    
                    
                    
                    
 Blue
 Red
 Magenta
 Green
 Cyan
 Black
                    
                    
 Blue
 Red
 Magenta
 Green
 Cyan
 Orange
 Black
 Green


Complications arise because GDDM cannot determine the colors of pens in the holder, and because the number of pens varies from one type of plotter to another. GDDM's actions are summarized in Table 9. In more detail, this is what happens:

  • For the default number, 0, GDDM always uses the highest-numbered pen.
    
    
  • For color 8, which is defined as the background color, GDDM uses no pen. It imitates a primitive drawn in the background color-the color of the paper. Such a primitive would be invisible, except where drawn on top of a primitive of a different color. Where this happens, GDDM clips the underlying primitive to leave a clear line or area representing the overlying primitive. In the case of overlying lines, the width of the clipped area is equal to the pen width as specified in the processing options, or 0.3 millimeters by default (see "Processing options for plotters" in topic 21.1.1).
    
    
  • Because color 8 (background) does not use any plotter pen, pen holder 8 on the plotter can be used to hold an extra color, which your application can use by specifying color 0 or 16.
    
    
  • For color -2, defined as white, GDDM takes the same action as for color 8; this means, on all plotters, using the background. For color -1, defined as black, GDDM takes the same action as for color 7; if the suggested color scheme for the pens is followed, the black pen is used.
    
    
  • If the color number is higher than the highest pen number, GDDM wraps around the set of numbers after the lowest power of 2 that is equal to or greater than the highest pen number. This means after 8 for a six-pen plotter or after 2 for a two-pen plotter. Numbers between the highest pen number and the next power of 2 use the highest pen number. So on a six-pen plotter, color 7, and also color 6, use pen 6 (color 8 is an exception-it always has the special meaning of "background"); color 9 uses pen 1, color 10 pen 2, and so on. And on a two-pen plotter, color 3 uses pen 1, color 4 pen 2, color 5 pen 1, and so on.
    
    
  • Color 7, which is defined as neutral and displayed as white on a color screen, uses a pen (unlike color 8). GDDM selects pen 7 on eight-pen plotters, and follows the wrapping algorithm on the other plotters.
    
    


    ________________________________________________________________________ 
   | Table 9. Color and pen numbers on plotters                             |
   |________ ____________ ____________ _____________________________________|
   | Color  | Meaning    | Color on   | Pen number (and suggested color)    |
   | number |            | screen*    |                                     |
   |________|____________|____________|____________ ____________ ___________|
   |        |            |            | 2-pen      | 6-pen      | 8-pen     |
   |        |            |            | plotter    | plotter    | plotter   |
   |________|____________|____________|____________|____________|___________|
   | -2     | White      | White      | No pen     | No pen     | No pen    |
   | -1     | Black      | Black      | 1 (black)  | 6 (black)  | 7 (black) |
   |  0     | Default    | Green      | 2 (red)    | 6 (black)  | 8 (green) |
   |  1     | Blue       | Blue       | 1 (black)  | 1 (blue)   | 1 (blue)  |
   |  2     | Red        | Red        | 2 (red)    | 2 (red)    | 2 (red)   |
   |  3     | Magenta    | Magenta    | 1 (black)  | 3 (magenta)| 3 (magenta|
   |  4     | Green      | Green      | 2 (red)    | 4 (green)  | 4 (green) |
   |  5     | Cyan       | Cyan       | 1 (black)  | 5 (cyan)   | 5 (cyan)  |
   |  6     | Yellow     | Yellow     | 2 (red)    | 6 (black)  | 6 (orange)|
   |  7     | Neutral    | White      | 1 (black)  | 6 (black)  | 7 (black) |
   |  8     | Background | Black      | No pen     | No pen     | No pen    |
   |  9     | Dark blue  | Dark blue  | 1 (black)  | 1 (blue)   | 1 (blue)  |
   | 10     | Orange     | Orange     | 2 (red)    | 2 (red)    | 2 (red)   |
   | 11     | Purple     | Purple     | 1 (black)  | 3 (magenta)| 3 (magenta|
   | 12     | Dark green | Dark green | 2 (red)    | 4 (green)  | 4 (green) |
   | 13     | Turquoise  | Turquoise  | 1 (black)  | 5 (cyan)   | 5 (cyan)  |
   | 14     | Mustard    | Mustard    | 2 (red)    | 6 (black)  | 6 (orange)|
   | 15     | Gray       | Gray       | 1 (black)  | 6 (black)  | 7 (black) |
   | 16     | Brown      | Brown      | 2 (red)    | 6 (black)  | 8 (green) |
   |________|____________|____________|____________|____________|___________|
   | * On 3270-PC/GX workstation.   For a 3179-G, 3192-G, 3472-G,           |
   | 3270-PC/G, 3279, and the 5550 family, only eight colors are available, |
   | and numbers in the range 9 through 15 wrap around to the colors blue   |
   | through neutral (white), and 16 to the default color of green.         |
   |________________________________________________________________________|


When designing an application in which plotter output is important, it is advisable to experiment with the colors. A usable and pleasing picture on the screen may not be so if it is plotted unchanged.

Go to the previous page Go to the next page



Copyright IBM Corporation 1990, 2012