4]--------------------------------- 3]PAINTBENCH: A Colorful Background 3]Copyright © 1990 by Robert D'Asto 3]All Rights Reserved 4]--------------------------------- PaintBench is a program which provides multicolored backgrounds for the Workbench environment in various ways. It can be run from either the CLI or Workbench. CLI users have the option of using PaintBench to create their own customized background patterns comprised of up to 200 different colors from the full Amiga palette of 4,096. PaintBench does its job without adding memory-gobbling bitplanes to the display and can be enabled or disabled at any time. It only changes the background color, leaving the foreground colors as set by Preferences. For those with a technical bent, PaintBench uses a programming technique called "copper programming" to change the background color in use on each individual scan line (row of dots) of the monitor's display as it is scanned. The "copper" is programmer slang for the graphics co-processor, a secondary processor which is unique to the Amiga and responsible for much of the Amiga's graphics power. 3]RUNNING PAINTBENCH FROM THE WORKBENCH The easiest way to run PaintBench is to double-click its icon. You will first see a bright rainbow-pattern background consisting of 100 or so different colors. Not the most practical sort of backdrop for getting work done, but it's pretty and it tells you PaintBench is working. After about a second the background will change to something a bit more tasteful. If you like what you see you can continue working and any program which then opens a window on the Workbench screen will have the same backdrop pattern. To disable PaintBench, double-click its icon again. The background will be returned to its normal, boring self and the memory used for the custom display will be returned to the system. You can turn PaintBench on and off as often as you like in this manner. 3]RUNNING PAINTBENCH FROM THE CLI There are three ways to run PaintBench from the CLI/Shell. In these examples it is assumed you are working with a copy of your JUMPDISK. The program is located in the PaintBench directory (drawer), so let's first open a CLI or Shell window and adjust our current directory by typing: cd j:PaintBench Now we can use the program. The first syntax produces the same result as described above for starting the program from the Workbench. Type: PaintBench (press Return> This produces the bright rainbow for a second and then the alternate pattern is displayed. Repeating the command returns the display to normal. If you want to keep the bright rainbow pattern, type this: PaintBench -r This isn't a very practical display, as text becomes difficult to read, but you can add this to your startup-sequence and then call the program again with the first syntax given above at the end of the sequence to turn it off. If nothing else, your IBM friends may be impressed when they watch you boot up. The third syntax for using PaintBench allows you to display a custom background pattern of your own design. The syntax is: PaintBench filename . . . where "filename" is the complete path name for a text file of the proper format (described below). For now type this: PaintBench PB_Demo PaintBench will start as before, but this time the second pattern produced will be completely different. This is because PaintBench read the contents of the PB_Demo file and converted it to color information and created a background pattern corresponding to the contents of the file. Run PaintBench again using the first syntax above to return to a normal display. You'll notice two text files with icons in the PaintBench drawer: PB_Demo and PB_ColorList. Both these files are in the correct format for conversion by PaintBench into a background pattern. The PB_ColorList file is a "blank" for use in creating your own display pattern. The PB_Demo file is an example of an edited file ready for use. First, look at the PB_ColorList file with a text file reader. Double-click its icon to read it. It looks like this: 000 000 000 000 ...etc There are 200 lines containing three digits each, in this case all the digits are zeros. At the bottom of the file you'll see the word "COMMENTS:". Each of the 200 lines of digits describes the color of a single horizontal line of the Workbench screen. The leftmost digit gives the red value, the middle digit the blue value and the digit on the right green. Each digit can be any of 16 different values, as follows: 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F All the digits are "0" currently, which means all 200 lines of the Workbench background will be zero red, zero green and zero blue. This, of course, produces the color black and if you were to run PaintBench using this file, that's what you'd get: a solid black background. If you were to change all the lines of the file to FFF, you'd get max red, max green and max blue, which would produce a solid white backdrop. By now you should be getting the idea. You create your own custom background pattern by changing each three-digit number to produce desired color. The top three digits correspond to the top line of the Workbench screen and so on down to the bottom, or 200th line. If you've never worked with creating colors this way, here are some simple guidelines: -- The bigger the number, the brighter the color, and vice versa. -- If all three numbers have the same or nearly the same value, the color produced will be black, white or a shade of gray. -- Red and green produce yellow. -- Red and blue produce magenta. -- Green and blue produce cyan (bluish-green). -- Combining all three of the colors in varying values produces, well . . . thousands of different colors! Now take a look at the PB_Demo file. This is an example (though a garish one) of a customized PB_ColorList file. Each line of digits has been edited to produce a different color so this file will produce a 200-color backdrop. 3]HOW TO EDIT THE COLORLIST FILE It's important the file used with PaintBench have the exact format shown in the two example files, PB_Demo and PB_ColorList. I suggest that in creating your own file, you load a copy of PB_ColorList into a text editor, edit the file and then save it under another name for use with PaintBench. Use only a simple text editor when editing this file, such as ED or EDIT. Do not use a word processor such as WordPerfect, Excellence!, etc. These programs may enter special formatting codes into the text of the file, which will result in a complete garbage display. The format of the file is simple but must remain intact for PaintBench to interpret it properly, because PaintBench does not discriminate. It will load and interpret any file, even a program file, translating anything which doesn't make sense into the color black. So, when creating your own file, simply load the PB_ColorList file into the text editor and change the existing three-digit lines as you like. In doing this you use the Delete key, the curser keys and the 0,1,2,3,4,5,6,7,8,9,A,B,C,D,E,F keys. The "A" through "F" keys can be either upper or lower case, but never insert spaces, comments, returns, etc into the first 200 lines of the file. If you want to add comments to the file, do so below the "COMMENTS:" line. Below this line you can write anything you like because PaintBench will never see it. Any extra or missing characters in the first 200 lines of the file will cause the resulting screen background to display garbage from that point downward to the bottom of the screen. You can create as many ColorList files as you like having any file name you like. You can then switch from one display pattern to another by calling PaintBench with the appropriate filename parameter. Be sure you give the full path when specifying these files. If PaintBench cannot find the file you've specified, it will abort and let you know with a message in the CLI window. 3]TIPS It's usually best to avoid background colors which are the same or close to existing foreground colors. These would be white, black and gold-orange in the default palette or whatever you've set via Preferences. Blending from one color to another is done by changing one or all the digits by a value of one on successive lines, for example: 500,600,700,800, 900,A00,B00 will produce a gradual shading of red and A00,A20,A30,A40,A50, A60 will blend a red color toward yellow. Too-bright background colors can be hard on the eyes after a while. I like to stick with color values in the range of "0" through "A" most of the time. Using the Search/Replace functions of your text editor can save you much time in changing one color to another. PaintBench can be used to create a ruled (lined) background which may be useful for certain text applications. 3]COPYRIGHT NOTICE PaintBench and its associated files are copyright 1990 by Robert D'Asto. Any person who has legally acquired the May 1990 JUMPDISK issue has the author's permission to make duplicates for his or her personal use. However, distribution or sale or any commercial use of copies of this material in whole or in part is not permitted without written consent of the author.