|CSB Home | Search | Table of Contents | General Information|
PolyTRIM User Documentation Revision 2
Visualization April 24, 1993
by Stephen Bohus
(c) 1990-93 Centre for Landscape Research
University of Toronto
Mr. Stephen Bohus/Original
Mr. Rodney Hoinkes/Hypertext - Updated Jan 4, 1995
What is CLRpaint?
CLRpaint is a 24 bit paint program which runs on Silicon Graphics 4D Workstations. CLRpaint can be used to cut and paste scanned images, add titles to screens, prepare texture maps, and to paint your own images. CLRpaint was originally started as part of an independent study course in Landscape Architecture and it was incrementally expanded to its current state over the last couple of years.
CLRpaint should run on all SGI 4D machines which have 24 bit graphics, 8mb of ram, and a hardware Z buffer. In addition, CLRpaint will also run on an 8 bit Entry Indigo with limitations. It is known to run on a Personal Iris 20-35G, 20-35TG, Entry Indigo, XS-24Z and Elan, 70GT, 220GTX, 310VGX, and a Crimson VGX. CLRpaint should also run on a XS Indigo, but it hasn't yet been tested on this machine. It may also work on XS or XS-24 Indigos without the zbuffer option, but again, it has not been tested on these platforms.
The code development of CLRpaint was assisted by Rodney Hoinkes and Shannon McKenzie of the Centre for Landscape Research. CLRpaint was developed under the direction of Prof. John Danahy who provided support and guidance for this project and the opportunity to develop this program.
CLRpaint can be accessed by typing
from an SGI machine in the CSB core cluster.(The path is /sgi/local/bin/)
CLRpaint has a simple user Interface. If you've played with the program before reading the documentation you've probably figured this out for yourself. At any rate, the mouse controls for CLRpaint are as follows:
Left Mouse button - The left mouse button is used for selecting drawing
modes and for drawing.
Middle button - This button acts mostly as an 'undo' when drawing circles,
boxes, lines, and other figures. This button erases a banded line,
circle, or other figure without changing the screen. The middle
button also allows you to redefine a colour in the palette box.
Right button - The right button toggles the main menu bar on or off. In a
few cases, this button is used to make a selection from a popup
menu (such as Load, Save, or Customize).
F1 - CLRpaint has two 24 bit screen buffers and F1 lets you switch from one screen buffer from another during almost any function. 'Swap' on the main menu provides the same function.
Return Key - can be used to select the highlighted entry in an alert box
Keyboard Entry is reserved for Text Entry and filenames.
The mouse buttons should be clicked and released immediately in most operations. Many operations (such as drawing a box) require you to click the left mouse button, release it, drag out a box, and click the left mouse button again.
The Main Menu
When CLRpaint is run, the first menu you are first confronted by is the main menu bar at the bottom of the screen (after the title screen). On this menu bar there are many buttons for all of the functions in the program. These functions are organized in into 5 areas. By default, the Rectangle Button will be toggled on along with the Filled button.
To draw a Filled rectangle go to anywhere on the screen above the main menu bar. Then click the left mouse button to select one corner of the rectangle, release the mouse button, move the mouse to the other corner of rectangle, and click the left mouse button again. You should now have a red rectangle on the screen. Now draw another rectangle on the screen. Select another point for a corner, click the left mouse button, move the mouse, but this time select the middle mouse button. The red 'banded' rectangle that was drawn between your current mouse location and the point you selected for a corner should have disappeared. The middle button erases the banded forms of rectangles and many other figures. Once you are comfortable with the use of the left and middle mouse button in this manner the rest of the functions in the program should be very easy to pick up.
To gain access to the Entire screen, click on the Right mouse button. The main menu will disappear and it will be replaced with a blank area. You can draw a red rectangle in part of the area that was previously occupied by the menu. If you toggle the main menu on and off the red rectangle will still be there.
You can change the active colour by clicking on a colour in the colour box with the LEFT button. The active colour is displayed below the colour box along with the RGB values for this colour. You can alternately click on 'Colour', 'Pick', or 'Slider' above the colour box to select a colour.
To draw shapes other than squares you can select Circle, Ellipse, or Polygon near the Rectangle button by clicking on them with the LEFT button. The Rectangle button will turn off and the button you clicked on will turn on. Circle, Ellipse and Polygon work similar to rectangles. For circles and ellipses you first select the centre and then the outside of the figure. Polygons are created by clicking on each line segment vertex with the left button and the middle button is used to close the figure. The 'Unfilled' button and 'Filled' button toggle between drawing filled or unfilled figures.
Most of the functions in CLRpaint work in a similar manner as these first four functions.
Layout of the Main Menu
The functions in the main menu bar are organized into 5 areas. From left to right, these are: (1) paint tools, (2) miscellaneous tools, (3) colour selection and zoom window, (4) block and lasso options, and (5) additional block functions (scale, flip, rotate).
A few of the buttons bring up popup menus (Load, Save, and Customize). To make a selection from the popup menu use the RIGHT mouse button. Some of the other mouse buttons bring up entry boxes and the queries from these boxes must be answered before you can use functions on the Main Menu again.
Real Time Zoom Window
The real time zoom window is one of the integral components of CLRpaint. To activate the real time zoom window click on 'Zoom'. The zoom window will appear on the right side of the screen. The zoom window works will almost all of the functions so it is possible to have this window up at all times.
You can move the zoom window anywhere on the screen by moving the mouse arrow inside of the zoom window, and by holding down the left mouse button while moving the zoom window around. You can also resize the window by clicking on one of the four corners and selecting a new size (click the left mouse again to select this size). To change the magnification of the zoom window select the 'Mag=5' button (just hit this button and type in a new value and hit return). The 'Show x,y' button shows the current x,y location of the mouse from the bottom left corner of the the screen (0,0) in the zoom window. Show RGB (under the customize menu) will display the RGB value of the pixel the mouse pointer is over. The box in the centre of the zoom window represents the current mouse location.
SUMMARY OF FUNCTIONS
1. PAINT TOOLS
The 'paint tools' are traditional functions provided by most paint programs to draw polygons, lines, and other figures.
Rectangle/Circle/Ellipse/Polygon - for drawing Rectangle, Circle, Ellipse and Polygons.
Filled/Unfilled - Will draw filled or unfilled rectangles, circles, ellipses, or polygons
Lines, Rays, Polylines and VHlines draw lines using the current linewidth. The LEFT button selects the starting and end points for lines. For Rays and Polylines (and also Polygons) the LEFT button selects each vertex, and the MIDDLE button stops drawing the current figure. The V-H lines option will draw lines which are perfectly vertical or horizontal.
Freehand - Draws a freehand 'line' with no breaks. The width of the brush used here is selected under linewidth. This function works best with the zoom window turned off (move the mouse slowly with the zoom window on).
Pixel - Draws individual pixels.
Linewidth - Selects the current linewidth (use the RIGHT mouse button to make the selection from popup menu; the first button will not work).
Linestyle - Selects a linestyle from the several provided. The linestyle at the bottom (solid line) is the default style. Linestyle will work only with lines, rays, polylines or v-h lines.
Antialias line - Lines, Rays, or Polylines will be antialiased when the linewidth is one and this option is toggled on. Some Silicon Graphics machines don't support antialiased lines and you won't be able to highlight this option on these machines.
2. LOAD & SAVE, ADDITIONAL TOOLS
Text - The text menu has a list of the typefaces currently available. The default text style selected is 'Times-Roman'. If your machine has many fonts installed, you can use Page Down and Page Up to scroll through the available fonts. Point size holds the point size of the current font (click on it to enter a new size) while rotation is the angle in degree the text will be rotated.
To enter text, hit the OK button (or hit return). At the prompt, enter your text and hit return. Next position the text with the mouse and click the left button to paste the text down (or the MIDDLE button to cancel). The Cancel button takes you back to the main menu (the right mouse button also returns you to the main menu).
All the point sizes for all the available fonts may not be supported by your system. In such a case, the closest available size for a font will be selected.
Flood Fill - This function will perform a flood fill operation. Please be careful as there is no undo! You may want to use 'Copy to Buffer' and
'Swap' as a means of periodically backing up the current screen (in essence you will be managing your own undo).
By default, machines with more than 16mb of memory will do a flood fill in memory and copy this to the screen when it is finished - you cannot see the progress of the flood fill; only the finished result. To watch a flood fill on thescreen select 'Screen Fill' from 'Flood Options' under the customize menu ('Memory fill' will switch back to a RAM based flood fill). The screen fill is much slower than a memory flood fill on large areas, but it is more entertaining to watch. Machines with less than 16mb of memory will use a screen fill by default. Entry graphics machines will only perform a screen fill (due to dithering problems).
Dither Fill under the Flood Options menu will let you do a fill on a dithered area (or on multiple colours). A 4x4 pixel box will appear beside the cursor and the flood fill will do a flood fill on all colours inside of this box.
The last option, 'Set top bytes equal' is an option that was present during the development of CLRpaint to solve a problem when flood fill wasn't working properly on a particular hardware platform (a 310VGX). This problem should not be present now, but just in case a 'flood fill' doesn't work, select this option and try the flood fill again (or select Screen Fill).
Swap - CLRpaint has two 24 bit screen buffers. Swap will switch between these two screen buffers.
The F1 key will also swap buffers, but unlike 'Swap', it can be used during most operations (including block operations thus allowing cut and paste between screens). You can quit CLRpaint and run it again and the contents of the backbuffer MAY come back after doing a swap on some machines (such as a Personal Iris with G to TG graphics).
Copy to buffer - This function copies the contents of the current screen to the other buffer (backbuffer). This function is handy in making a quick backup of the screen that you are working on (since saving the screen is time consuming). Most functions in CLRpaint don't have an 'Undo' function, so copy to buffer is an effective way to backup your work quickly. (CLRpaint doesn't have an 'undo' implemented for most functions since it would require lots of memory and it wouldn't be able to run it on an 8mb machines)
Airbrush - The airbrush will spray an airbrush around the cursor when the LEFT button is held down. The intensity of the colour in the airbrush decreases away from the centre of the airbrush circle. Having the zoom window on will significantly slow down the airbrush and splatter functions so you may wish to turn off zoom beforehand. Spread, Radius, and Flow are used to change the characteristics of the airbrush.
Splatter Brush - This brush is similar to airbrush, except the sprayed colour is one solid and constant colour.
Spread - The Spread function controls the intensity of the colour as it fades from the centre of the airbrush.
Radius - The Modify Airbrush size box selects the radius of the airbrush or splatter brush. To change the size, click down on the slider bar, hold down the left mouse and move the slider to the left or the right. Select Use to use the current radius or Cancel to go back to the main menu without any changes.
Flow - The Select Flowrate menu changes the rate at which the airbrush works. It also controls the spray rates for the splatter brush and the Blow Through Circle and Block options. By default the flowrate is set to maximum.
Scroll, Step, Undo & Zoom In (Virtual Screen)
The scroll button appears only when a virtual screen (a screen wider than 1280 and/or taller than 1024) is loaded or is created(under customize). Along with the scroll button there is an a Step button and an Undo button which also appears. Pressing the scroll button puts you in a mode which allows you to scroll around the virtual image using the arrow keys. The amount that is scrolled is controlled by the Step button, and it is 200 pixels by default. To get out of the scroll mode just press any one of the mouse buttons. The Undo button will undo all changes in the current scroll position and restore the screen to what it was when you moved to the current location.
Zoom In lets you zoom in and out of your virtual screen and move around this virtual screen. To move around, use the arrow keys and to zoom in and out (change magnification) use the + or - keys. The 'arrow keys' on the keypad are for smooth movement (holding the SHIFT key and using the keypad 'arrow keys' allow for faster movement). To get out of The Zoom In mode press any of the mouse buttons. Your screen will be restored to the standard magnification at this point.
Note: the virtual screen mode works best with Irises with 16mb of memory or more (8mb Irises should only be used for virtual screens slightly larger than the screen or else there are great delays paging off the screen to disk).
LOAD & SAVE
CLRpaint supports many different file formats. The Iris .rgb format is the standard format used by many Silicon Graphics programs (such as ipaste, scrsave, snapshot). The rle format is a popular format on other systems, and this format loads and saves images very quickly. Tiff files can be loaded and saved in 8 bit greyscale and 24 bit colour. Photo CD image can be loaded direclty from a Kodak Photo CD disk. The RAW format saves a block as a raw 24 bit raw image. The save cursor shape and save lrectarray options should be of interest to programmers. Compressed images can be loaded by CLRpaint directly.
Clicking on the Load button will bring up a popup menu with the following options:
1. Full Screen Iris
2. Iris RGB block
3. Block to position
4. Inquire block size
5. Targa Image
6. RLE Full Screen
7. RLE Block
8. RLE Block to position
9. Inquire RLE size
10. RLE Mask Screen
11. RAW 24 bit block
12. TIFF Images
13. JPEG jfif Image
14. GIF Image
15. Photo CD
16. Photo CD block
17. Photo CD size
18. Keep dir listing
19. Show entire directory
Select a file format from this list with the RIGHT mouse button.
Options 1-4 will load SGI format 24bit or greyscale images. Options 6-10 load rle format images.
The 'Full Screen Iris' loads an SGI format image into the lower left corner of the screen. If the image is larger than the physical screen, it will be loaded as a virtual screen.
The Iris image does not have to be full screen in size in order to load.
'Iris RGB block' will load a single or multiple SGI format images (both colour and greyscale). Image files are loaded in the lower left corner of the screen, then disappear and a bounding box the size of the image appears. To paste down the image on the screen, move the bounding box to a desired location and press the LEFT mouse button. You can paste a loaded image down in multiple locations. The RIGHT mouse button makes the current bounding box disappear and the program then loads the next image in the list (if loading multiple files) or returns you to the main menu.
'Block to position' will load an SGI image file and prompt you to enter the coordinates of the lower left corner of the location the image is to be loaded at.
'Inquire block size' will NOT load an SGI image, but it will return the size (in x & y) of the image file (or files) selected in the file loader.
The RLE load options (6-10) correspond in function to the Iris image format load options (1-4). The 'RLE Mask Screen' is an additional function which will load an RLE screen image and not draw areas in pure black (0,0,0).
'Targa Image' loads a Targa-16 uncompressed file.
'RAW 24 bit block' loads 24bit blocks saved in CLRpaint. These files have the header 'RAW width height\n' and then have red, green, blue, red, green, blue values stored sequentially with no compression.
TIFF Images - Most image files in the TIFF format can be loaded including files created on Macintosh and IBM compatible machines.
JPEG jfif Image - Images in the JPEG (.jpg) format can be loaded.
GIF Image - Images in the GIF (.gif) format can be loaded. GIF support is currently for the 87a gif version.
PhotoCD and PhotoCD block load images from Kodak .pcd format. Images can be loaded directly from a CD-ROM disk. The Photo CD size menu selects from image sizes of 128x192, 256x384, 512x768, 1024x1536, and 2048x3072. The default size is 512x768. The three smallest sizes should load without any problems; however, you will probably need more than 32mb to load a 1024x1536 image and far more
memory to load a 2048x3072 image. On low memory machines you can use an photo cd to iris rgb translator (there should be one on the ftp site clrpaint was downloaded from). The larger iris rgb images should load properly on a 32mbworkstations.
Note for CD-ROM users: Most SGI CD-ROM drives are single-session drives. Only the first session on a Photo CD can be accessed; all subsequently recorded images are not avaiable on these drives. If you create a PhotoCD, you should put all the images you need onto the disk at once to create a single session disk. If youre reading images directly off a PhotoCD, it may take several seconds to get a full directory listing. To speed subsequent directory listing, toggle the Keep dir listing option in this popup menu.
Keep dir listing/Update dir listing - A toggle updating the current directory listing. If the current directory listing is not updated this file loader will come up instantly (after the first directory listing); this is useful when working with a slow storage device (such as a CD-ROM) or with a directory with hundreds of items. Any new files created in this new directory wont show unless you backup out of the directory and into it again (unless the Update dir listing is on; the default setting).
Show Entire/Normal Directory - A toggle between showing a normal directory or all files in the directory (including hidden files like .*)
The File selector
The file selector is used to navigate through a filesystem and select files to load.
The first time the file selector is invoked a listing of the files in the current directory is displayed (this is would be the directory you were in when you started CLRpaint). The path of the current directory is displayed and centered at the top of the screen.
To select a file, click with the LEFT mouse button on the file you wish to load (this will turn the button to black with white text). To deselect a file, click on a selected file with the MIDDLE button. You can also deselect ALL files by clicking on Trash All Selections with the LEFT button. You can select multiple files from multiple directories to load at the same time (for some file formats). When you are finished selecting files to load click on 'Selection Complete', or to get out of the file selector without loading anything click on 'Make No Selections'.
If there are too many files in your directory to be displayed on the screen at once, click on 'Next Page' and 'Previous Page' to look at the rest of the files in the current directory. The file loader has a current limit of 500 files per directory.
To back up a directory, click on 'Previous Directory' with the LEFT mouse button. You can also hit the RIGHT mouse button at any time to back up a directory. To go into a directory, click on the directory name in the list of files and directories. All directory names are listed in white (while filenames are listed in black). When a directory name is clicked on, this directory will become your current directory and the files listed on the screen will be updated.
The 'Home' button takes you to the directory you started CLRpaint in. All files saved in CLRpaint are put into the directory you started the program in (by default). The 'Image only' button will show only image files in the current directory (all files with the following extensions: .rgb, .rle, .tif, .tiff, .jpg, .gif, .bw, and compressed versions of these file types).
The interface for the file selector is as follows: the left mouse button is used to select files and other buttons. The middle button deselects files. The right button goes back a directory.
Files are saved in your home directory by default. Files can be saved into another directory with the Change save directory option.
Clicking on the Save button will bring up a popup menu with the following options:
1. Full Screen Iris RGB
2. Iris RGB Block
3. Block Specify Size
4. Block Specify Size and position
5. Full Screen B&W Iris
6. B&W Iris Block
7. B&W Block Specify Size
8. B&W Block Specify Size and position
9. greyTIFF screen
10. greyTIFF block
11. greyTIFF block - specify size
12. greyTIFF block Specify Size and position
13. RLE Full Screen
14. RLE Block
15. RLE Block - Specify Size
16. RLE Block Specify Size and position
17. RLE Block channels
18. RLE channel specify size
19. RAW 24-bit block
20. 24bitTIFF screen
21. 24bitTIFF block
22. 24bitTIFF block - Specify size
23. 24bitTIFF block Specify Size and position
24. JPEG screen
25. JPEG block
26. GIF screen
27. GIF block
28. Save cursor shape
29. Save lrect array
30. Compress files
31. Change save directory
'Full Screen Iris RGB' saves out the entire 1280x1024 screen as a colour image file (a 1024x768 screen on Entry graphics systems). If a virtual screen is currently in memory, the full screen option will save out the entire virtual screen. After this option is selected from the popup menu a box will appear and prompt you to enter a filename.
'Iris RGB Block' saves out a block from the screen. Click with the LEFT button on one corner of the block, release the button, drag out the box around the block you wish to save, and Click the LEFT mouse button again. To cancel the block you are selecting hit the MIDDLE button (you can select a new corner with the LEFT button) or to exit save block without saving anything you can press the RIGHT button. The zoom window can be on when you are selecting a block, but it should not be inside the block you select (otherwise the selected block will be ignored).
Selecting a block parallels the process used to draw a rectangle.
'Block Specify Size' saves a colour Iris image block. A box will appear and prompt you to set the size of the block you wish to save. To change the default size of 256x256 click on the number, key in a new value and press return. Click on 'Use' to select this size. A bounding box with the dimensions you specified will appear. Position this box around the block you need to save and click the LEFT mouse button. This function is very useful in saving texture maps of a set size.
'Block Specify Size and position' is the final option to save out colour iris format images. It is similar to Block Specify Size with the addition of another input box to specify the x,y coordinate of the bottom left corner of the block you wish to save. Once the two input boxes are satisfied the image block will be saved and you will be returned to the main menu. If a virtual screen is in memory this option will save the specified block from the virtual screen.
Options 5-8 (black and white iris) correspond to options 1-4 in function except the image format is greyscale iris format (.bw). If parts of the image are in colour on the screen they will be saved as black and white (greyscale).
Options 9-12 (greyscale tiff) correspond to options 1-4 in function except the image format is greyscale tiff format (.tiff). If parts of the image are in colour on the screen they will be saved as black and white (greyscale).
Options 13-16 (colour rle format) correspond to options 1-4 in function except the image format is rle colour.
Options 17&18 corresponds to option 2&3 in function respectively except the image format is RLE channel. RLE channel saves out three files for red, green, and blue channels respectively.
'RAW 24-bit block' (option 19) corresponds to option 2 in function (Iris RGB Block) except it uses an uncompressed format. These files have the header 'RAW width height\n' and then have red, green, blue, red, green, blue values stored sequentially without compression.
Options 20-23 (colour tiff) correspond to options 1-4 in function except the image format is colour 24 bit tiff. An alert box prompts the compression to be used for the tiff block (None,PackBit, or LZW). The LZW option has the best compression. Tiff files exported to a Macintosh may need to be run through a program to change their headers (such as RezEdit) so they are shown in the Mac file loader.
'JPEG screen' corresponds to option 1 in function except the image format is jpeg colour. The jpeg format has great compression ratios but there is data loss in the image storage (although the stored image will visually appear to be identical to the original saved image).
'JPEG block' corresponds to option 2 in function except the image format is jpeg colour.
'GIF screen' corresponds to option 1 in function except the image format is gif. The gif format is only 8bit, so when you save out a gif image the file will be turned to 8bit (even if you are working on a 24bit machine).
'GIF block' corresponds to option 2 in function except the image format is gif. Gif format supports only 8 bit colour.
'Save cursor shape' saves out a cursor description which can be inserted into a C program. Two sizes of cursors can be saved - a 16x16 cursor and a 32x32 cursor. All colours except for black (0,0,0) will be saved to make the cursor shape (black is the see through part of the cursor).
'Save lrect array' (larray format) saves out a block which can be inserted as an image into a C program. The block is saved into the format used for lrectread and lrectwrite (into a static unsigned long array).
Compress files - this 'save option' does not save any parts of the screen. It invokes the file loader and the files you select are compressed using the standard Unix compress utility.
Change save directory allows you to change the directory that files are saved out into. By default, all files are saved in your home directory (the directory you started CLRpaint from). The file selector is invoked by this function, and to select a new directory move to the directory you wish to change to. When you are in your new directory, select 'Selections Complete'. All subsequent files will be saved in the new directory you selected. If you do not have write permissions in a destination directory you will not be allowed to change to this directory. Change save directory is very useful if a filesystem is full and you wish to keep on saving out files.
Loading/Saving Special Notes:
CLRpaint monitors free disk space. When the disk space is low (under 5mb) an Alert box will inform you (this may happen upon startup). If the disk space runs out after you save a file, an Alert box will inform you that the file you have just saved probably didn't get saved properly. If the disk space runs out on the filesystem you are currently on you may be able to find space elsewhere using the Change save directory function.
Entry Graphics system
Users of Entry Graphics systems should make sure they read the Entry Graphics Notes under the Additional notes section (this section describes how to eliminate dithering problems on load and save operations). When loading a 1280x1024 iris screen the file can be compressed to fit the Entry screen (while loading). Larger images can also be loaded as a virtual screen or the bottom left corner of the image can be loaded.
Loading Compressed Files Directly
CLRpaint by default decompresses compressed files into a temporary file and loads these uncompressed files. Some very large files may not load and decompress properly if you don't have enough room in the /tmp directory to create a decompressed version of the image file. There are three actions which you can take if you run across this situation: 1) decompress the file outside of CLRpaint (in a shell or workspace), (2) select from the Customize menu 'Select Uncompression' and use the Extract option to decompress the original file and then load this file
(rather than making a working copy), or (3) increase the size of /tmp
Saving out a block with a specific size
Saving a block out with a specific size (such as 256x256 pixels) is a fairly easy task. If there is a Specify block size option for the file format the use it to enter the block size. If no such option exists (such as Save lrect block or Save Raw block) then you can take the following steps.
First, turn on the zoom window and the Show x,y option. Next, grab the block you with to save out with Block and copy it to the bottom left corner of the screen. If you want to save out a block of 256x256 pixels, select the Save block option and position the mouse cursor at position 255,255 and click with the LEFT mouse button. Next position the mouse cursor at 0,0 and click the LEFT mouse button again. CLRpaint will then save a block 256x256 in size.
3. COLOUR, ZOOM WINDOW AND CUSTOMIZE
There are four ways to change your active colour. The easiest way is to click on one of the 125 colour boxes in the palette range display area. Colours can also be picked off the screen, from a colour wheel, or from a RGB colour slider.
Palette area - You can quickly pick a colour from this box of 125 colours and the current colour with the LEFT mouse button by clicking on a box and RGB value for this small colour box is displayed below the palette box. To redefine a colour in this palette box, click over the colour box with the MIDDLE button. You can choose a replacement colour with the colour wheel (or click on Pick or Slider to get a colour by picking a colour off the screen or setting a colour with the RGB slider). You can save and load custom palettes (see Palette options under the Customize popup menu).
Colour - Brings up a colour wheel. To change the colour intensity, use the intensity slider bar. Reset will reset to default colours, Centre will centre the pick circle. Click inside the colour circle to select a colour.
Pick pixel - This function picks a colour off the screen. The Left button picks the colour of the pixel the arrow is pointing to. When this function is invoked a small box showing the picked colour will appear (this box also has Use and Cancel buttons). This box can be placed anywhere on the screen by clicking inside the box anywhere except on the Use or Cancel buttons with the LEFT mouse button, and by HOLDING down the LEFT mouse button and by moving the box to a new location. The Use and Cancel buttons select and cancel the picked colour respectively. The the MIDDLE button can also be used to select the current picked colour while the RIGHT button can be used to cancel.
Slider - Using the sliders for red, green, and blue, you can pick any colour from the 16.8 million supported by the Iris.
Zoom - This button will activate the real time zoom window (the window will appear on the right side of the screen). As you move the mouse pointer, the zoom window will update. The box in the middle of the window shows the pixel the mouse pointer is over. This window works with almost all of the available functions so you can have it up all the time.
To resize the zoom window click on any of the four corners with the LEFT button (then resize the box and click again). You can move the zoom window anywhere on the screen by moving the mouse arrow inside of the zoom window, and by HOLDING DOWN the LEFT mouse button while moving the window around.
The magnification of the zoom window is set by the 'Mag=5' button (just hit this button and type in a new value and hit Enter).The 'Show x,y' option displays the current x,y location of the mouse from the bottom left corner of the screen (0,0) in the zoom window. The Show RGB option (toggled from the Customize popup menu) displays the RGB value of the pixel the mouse pointer is currently over.
You can tint either block or polygons. Select the type of area you wish to tint from the Alert box (which comes up after tint is pressed).
After the initial alert box, all menus disappear and you must select an area to tint. If you selected a block, click with the LEFT mouse button on one corner of the block and click again with the LEFT button to select the opposite corner for the block. If you are tinting a polygonal area, click with the LEFT button on each line segment around the polygon and close the polygon with the MIDDLE mouse button.
Once a block or polygonal area is selected to tint, a Tint Box is displayed. You can move this tint box anywhere on the screen by HOLDING down the LEFT mouse button when you are anywhere inside of the box (not over a button). On your selected area you can add or subtract red, green and blue values (with Modify RGB), make the area black and white, invert the colours, or gamma correct the block (brighten it up or darken it). You can select 'Gamma: 1.05' and enter in a gamma value for gamma correction. To gamma correct an area select Gamma Normal or Gamma Contrast and press + or - under All, Red, Green, or Blue. Gamma Normal toggles on the traditional gamma correction (which tends to reduce contrast while the Gamma Contrast increases contrast).
If you would like to keep the changes made to your block press 'Use' and then 'Cancel' to exit. 'Use' will use the screen block with present changes, but not exit. 'Undo' will restore the screen area to whatever it was before, or whatever was last selected by 'Use'.
The customize menu began originally as a way to change the default colours and other default settings. It eventually became a miscellaneous collection of useful tools and functions.
Clicking on the Customize button will bring up a popup menu with the following options:
1. Select Colour 1
2. Select Colour 2
3. Select Colour 3
4. Save Defaults
5. Filter Up Type
6. Virtual Screen
7. Virtual Options
8. Lasso Block
9. Polygon Block
10. Colour Count
11. Replace Colour
12. Replace all except
13. Select Uncompression
14. Default Compression
15. Save Poly->
16. Stop save pcode
17. Compress block
18. Show RGB value
19. Flood options
20. Palette options
21. Full Screen (Irix 3.3 only)
22. Menu Bar (Irix 3.3 only)
The first three options set the colours for the user interface (background, text, and banding colours). 'Save Defaults' saves these colours (and some of the other program variables) into a file (CLRpaint.info). The next time CLRpaint is run from the same directory these defaults will be loaded.
The 'Filter Up Type' lets you select the type of filter that will be used when blocks are resized with the smooth scale option (best filter is Mitchell, default filter (triangular) is the fastest).
'VIRTUAL SCREEN' allows users to set up an image that is LARGER than the physical screen in either direction. A text entry box prompts you to enter a screen size larger than the current screen (larger than 1280x1024 or 1024x768 depending on graphics option). The virtual screen can be larger than the screen in either direction or both directions (eg. you can have a 2000 wide by 200 tall screen, 150x1800, or 2000x2000 image). To save out a virtual screen to disk use save 'Full Screen Iris RGB' (or B&W Iris, or RLE Full screen). These are the only file formats that load and save virtual screens (other file formats saving a 'full screen' will only save out the physical screen). When an image larger than the screen is loaded a virtual screen will be set up automatically.
Note: The copy to backbuffer option will only make a backup copy of the physical screen (not the virtual screen). When a virtual screen is set up, four new options appear (under Clear - see Scroll, Step, Undo and Zoom In for more information).
'Virtual options' bring up another popup menu for additional functions for virtual screens. The first two options allow a wraparound of the virtual image to be turned on. 'Wraparound On' works when you are in 'Zoom In' mode, and it wraps the left edge of the virtual screen around to the right side (very useful when viewing a 360 degree panorama), and this mode lets you keep scrolling around your image in circles. 'Free Virtual Image' deletes the virtual screen from memory. 'Zoom x,y virtual' displays the relative x,y location the mouse pointer is in the virtual image in the Zoom window (when Show x,y is on), and this option is the default. The other option (Zoom x,y screen) displays the current x,y location relative to the lower left corner of the screen (0,0). Finally, the 'Get size of virtual image' displays the physical size and memory requirements of the virtual screen in memory.
'Lasso Block' selects Lasso as the type of free form 'block' (beside block). Lasso is the the default, it can be changed to Polygon. If 'Polygon' has been selected, the 'Lasso Block' will change the 'Polygon' button to Lasso.
'Polygon Block' selects Polygon as the type of free form 'block' to use (beside block). Selecting Polygon will change the 'Lasso' button to a 'Polygon' button. Lasso and Polygon are almost identical in function. To select part of an image with 'lasso' you hold the LEFT mouse button down and cut the image out with Polygon you must draw a polygon around the area you wish to cut (by clicking on each vertex).
'Colour Count' finds the number of times the current colour appears in a selected block and it figures out the percentage of the block this colour represents.
'Replace Colour' does a search and replace operation that replaces the selected colour inside a block with the current colour.
'Replace All Except' replaces all colours inside of a block except for those colours that have been chosen to be protected. The operation is very useful when drawing over a scanned image with solid colours and isolating only certain colours.
'Select Uncompression' - When compressed image files are loaded, CLRpaint uncompresses image files into a temporary file and keeps the original file intact (it loads the temporary file). To have an option to decompress compressed files use this option. Each time you attempt to load a decompressed file and Alert box will ask you if you wish to Load the file, Extract, or Ignore the file. 'Extract' will decompress the selected file, load the selected file and leave it uncompressed. 'Load' will load uncompress a file to a temporary file and load it (the default). Ignore will not load the image file.
'Default Compression' - CLRpaint by default decompresses compressed (.Z) files into a temporary file and loads this temporary file. If 'Select Uncompression' was previously selected, CLRpaint will restore this default setting.
'Save Poly->Code' - This option is of particular interest to programmers. The GL commands to draw lines, rectangles, circles, polygons, rays, and polylines are saved out to a file (you are prompted for the filename). After you enter a filename, all subsequent figures created with lines, rectangles, circles, polygons, rays, and polylines will be saved out as source code with the current active colour. All figures will be saved relative to the (0,0) coordinate in the lower left corner of the screen along with two variables to adjust offsets.
'Stop save pcode' - Stops saving polygon file descriptions (see previous option). After this button is pressed a new polygon file can be saved (with Save Poly->Code).
'Compress block' takes 1280x972 section of the screen and compresses it down to a size of 648x486 and saves it out as an rle file. The 648x486 size is the "standard" NTSC size. This function does not work on Entry Graphics systems.
'Show RGB value' shows the current RGB value of the pixel the mouse pointer is in. This RGB readout is displayed inside the zoom window. To toggle this option off, select Show RGB value again.
'Flood options' brings up additional options for Flood fill (see flood fill for further details).
'Palette options' brings up another popup menu for additional controls on the colour palette area. 'Restore Settings' restores the default colour boxes in the palette area. 'Greyscale Range' makes a graduated greyscale for the palette area. 'Save Palette' saves out the current colours in the colour palette area while 'Load Palette' loads back a saved palette.
'Full Screen' & 'Menu Bar - On machines running system 3.3.2 and lower the 'Full Screen' will eliminate the menu bar at the top of the screen and allow the entire 1280x1024 screen to be used. With the menu bar, the screen area is 1280x1020. 'Menu Bar' will bring back the menu bar and the 1280x1020 screen area. However, if the program happens to hang and there is no menu bar it cannot be easily killed (the process must be killed from another machine or the machine must be rebooted). You can not go to a 1280x1020 screen if you are using system 4.0 or higher (uses 1280x1024 screen as a default except on Entry graphics which is 1024x768; this option doesn't apply to Entry graphics since no Entry graphics machines can run Irix 3.3).
4. BLOCK MANIPULATION & BUFFER
The block/lasso section of the main menu performs cut and paste operations on blocks or irregular areas on the screen. The blow thru options are airbrush options on blocks and circular areas. Buffer can be used to trace around the edges of a single colour.
Cutting and pasting blocks on the screen is a simple matter. Just hit 'Block', go onto the screen area, and select a block. To select a block, click on one corner of the box with the LEFT mouse button, click again in the other corner of the block. To paste down a block move the outline of the block to a new position and hit the LEFT mouse button.
To see the actual block as you move it around the screen select 'Solid' (beside Outline). Now select a block (the same way as before) and move it around. When you move the block around now you will see the actual block bitmap and not an outline. To paste down the block use the LEFT mouse button. To select a new block click on the MIDDLE button and cut out a new block. (HINT: when selecting a block select the top right corner of the block first and then the lower left corner of the block).
To paint with a block select 'Draw' (beside 'Copy'). Select a block from the screen, and HOLD down the LEFT mouse button while moving the mouse.
Pressing 'Block' by default turns on 'Copy' and 'Outline'. Other than Copy or Draw, and Outline or Solid, the following options can be used in conjunction with block copying operations:
Mask, Writemask, Mask Tolerance, Alpha Blend, Get from Backbuffer
The 'Mask' option will make the mask colour (black) invisible while copying a block. When a block is copied all colours except for black will be written to the screen. The mask colour is black by default, but a another colour can be selected instead with 'Get Mask'.
The 'Mask Tolerance' option behaves in a similar manner to 'Mask'; the entire block is copied in a block operation except for the colours in the mask tolerance range. Colours in the mask tolerance range can be set under 'Get Tol' with the Mask Tolerance slider menu (by default, the mask colour is black and the tolerance is plus or minus 5 pixels around each r,g,b value in this mask; the mask tolerance slider has individual control for each rgb value in the mask colour and each tolerance around this value).
'Writemask' works in conjunction with Mask or Mask Tolerance. The writemask option will only copy a block to a part of the screen below the block that has pixels with the same value as the mask (or the mask tolerance).
'Alpha Blend' will make the values in your block transparent and it average this block with the screen area below it (when it is pasted down). The percentage of transparency is selected by hitting the percentage beside alpha (initially 50%) which brings up a set alpha percentage menu (use the slider bar on the selection screen to adjust this value).
'Get from Backbuffer' cuts a block from the backbuffer and pastes it to the current screen. This is useful when you want to restore a small part of a screen that was copied into the backbuffer (to 'undo' a mistake). This option, like all the other block options above works with all other block functions including alpha blending, mask, and writemask.
Lasso has most of the options as block expect it allows a free form area to be selected. To select a free form area, HOLD down the LEFT mouse button while moving the mouse around the screen and define the area. 'Polygon' also selects a free form block, except you have to select a polygon by clicking on each vertice with the LEFT mouse button (the MIDDLE mouse button closes the polygon; Polygon has more control in selecting an area than Lasso). To activate 'Polygon' instead of 'Lasso' select 'Polygon Block' from the Customize menu. To return to Lasso select 'Lasso block' from the same menu.
Lasso will work with all the options that work with in conjunction with Block except for 'Get from Backbuffer', and the rotation, scaling, and block flipping functions (see Scale Block Section for more information on the scaling and rotation functions).
Note: While you can have a zoom window up during Block or Lasso operations, make sure that you DO NOT move the zoom window area when you are in 'Solid' mode and if you have selected a block or irregular area.
Blow Thru Block/Circle
Blow Thru Block uses the selected block and blows an airbrush through the grabbed block. To blow the airbrush HOLD down the LEFT mouse button (this is just like using 'Splatter' or 'Airbrush').
Blow Thru Circle is similar to Blow Thru Block except this function uses a circular area that was cut and blows an airbrush through this grabbed circle. To select a circle, select the centre, then the radius, and then select the circular area you want to cut (and click on the LEFT mouse button to finish each step).
All of the toggles used for Block are available for these functions (except for Get from Backbuffer).
To change the speed at which the blow through operations work select 'Flow' (this option also varies the airbrush and splatter brush flow rates).
BUFFER (Trace operation)
Buffer allows you to create a buffer around a selected colour (inside of a selected block). Alert boxes and information boxes will guide you through the process of creating a buffer.
The width of a buffer can be anywhere from 1 to 100 pixels. A single colour can be used as a buffer or a colour gradient can be chosen. Other colours inside of the block can be protected from this buffer operation by selecting protect and then selecting a list of colours or a single colour to protect.
Buffer is a very powerful tool, and it will take some experimenting to take full advantage of it. For example, an unusual use for buffer is to create outline fonts (select the colour of the font and use a contrasting colour to buffer it; a width of 1, 2, or 3 usually works effectively).
Map/Col (Remap over colour)
This function tints the cut block with the active colour and blends this block with the background. I don't know how useful this function is really is, but I needed it one day so I added it. At any rate, the Map over Colour function does the following operation on a block when it is pasted down:
foreground_colour = (background_buffer_colour)*selected_colour
5. SCALE BLOCK
The functions under 'Scale Block' work in conjunction with the 'Block' operations described in the last section. Blocks can be scaled, flipped, and rotated.
Scaling a block
To scale a block select 'Regular'. When 'Regular' is selected the 'Proportional' menu is also highlighted. Blocks can be scaled proportionally, normally (proportions not kept), and you can specify the destination size of the block in pixels (done by selecting 'Proportional', 'Normal', and 'Specify Target Size' respectively).
To scale a block, first select the block as usual. After the block is selected, a banded box will be drawn. Position the mouse so that you have the desired destination size for the block and click the LEFT mouse button (for Proportional and Normal options). If you had the Specify Target Size option toggled on an Entry box will appear after you have selected your block. The Entry box will prompt you to enter a new width and height for the scaled block. The program will scale your selected block and you will be free to paste it down and copy it. The 'Regular' scale function scales a block without any smoothing (interpolation), so scaled blocks may have a blocky appearance.
The 'Smooth' option works just like the 'Normal' scale option in function except the program filters a block when it is resized. Filtering will result in a smoother scaled block (in scaling the block to a larger or smaller size). The program takes a little more time to scale a block with 'Smooth' than 'Normal'. There are different types of filters can be selected for the smooth scale option under the customize menu (see Filter Up Type under customize for more information).
Blocks can be rotated left or right 90 degrees, 180 degrees, or by any angle. If a rotation of 180 degrees, 90 degrees right or 90 degrees left is selected, a block will be rotated immediately after it is selected (and you will be free to paste it down).
'Degree' lets you rotate a block by any amount. After selecting a block a degree readout will appear under your mouse pointer and a rotated box will appear anchored on the lower left corner of the selected block. Moving the mouse pointer around will change the rotation amount, and click the LEFT mouse button when you reach the desired rotation angle. When you paste down a block rotated by 'Degree' you will notice that the block rotated properly and it is inside the edges of a black box. To get rid of this box select 'Mask' from block (and if you've changed your mask colour then reset it to black). Around the edge of the block there may still be a slight black outline; one way to remove this border is by selecting polygon and cutting around the edges.
The 'Degree' menu can also work with a preset rotation increment. The percentage rotation (initially 45 degrees) beside the 180 option brings up a rotation selection menu. By default, the Free Rotation mode is enabled. Use the slider bar to select a rotation angle and disable the 'Free Rotation' button to enter a preset rotation. With 'Free Rotation' off and 'Degree' on, a selected block will be rotated by the set angle.
Flipping a block Vertically will mirror the block vertically. Flipping a block Horizontally mirrors the block horizontally.
The Irix 3.3.2 compiled version of CLRpaint should run properly on most machines with Irix 4.0.1 and above. If you are using an Entry Indigo or XS graphics you should have the 4.0 compiled version.
Beware of 'Screen Savers'
Under Irix 4.0 there are several screen savers available. You should only use the standard screen saver in conjunction with this program (the screen just turns black with this screen saver). Since CLRpaint uses the framebuffer to store the image that you're working on, some screen savers (such as fireworks) will destroy your work.
Don't Stow Program or Move Window
Since CLRpaint uses the framebuffer to store the image that you're working on, stowing the program will destroy your work. The program assumes that it has the full screen to work on (which it does) so it is not a good idea to pick up the window (a difficult task in itself) and place it elsewhere. All functions will not work properly if the window has been moved.
If the program somehow hangs, hold down the ALT key and hold down the RIGHT mouse button. Select 'Quit' from the system popup menu. If you are running Irix 3.3, go up to the extreme top of the screen (where there is a line), and use the rightbutton to bring down the menubar and select quit to kill it. If program dies and leaves a mess, do a 'gclear' (the pathname is /usr/sbin/gclear).
Zoom Window Centre disappearing
The tiny box in the centre of the zoom window sits in the overlay bitplanes and occasionally it can be accidentally deleted. To get this box back you can either pick up the zoom window and drop it down again or simply move the mouse pointer into the menu area.
Entry Graphics Notes
Entry graphics will not work as smoothly as normal 24bit graphics in some situations. Some additional functions have been added to make Entry Graphics more useable.
Entry Graphics machines (and XS if the program works on it) should be running a version of CLRpaint compiled under Irix 4.0.+. CLRpaint compiled under Irix 3.3 will still run but most of the functions will not work properly.
Loading and Saving Files - IMPORTANT - When loading and saving files on an Entry Indigo, the files are loaded as dithered files by default. Repeated loads and saves a file from an Entry Graphics machine will degrade the picture quality. All file formats dither the loaded files except for the RLE load option. Saving and loading files in the RLE format will not degrade the picture quality of a file under an Entry Indigo. Files are loaded as Dithered (except for RLE files) because CLRpaint expects a true 24 bit file. True 24 files are created on other Silicon Graphics machines
including the Personal Iris 20G, Indigo XS24Z, 310 VGX, and 70GT.
Flood fill - The default flood fill is one colour fill. Since many of the solid colours drawn on an 8bit machine are dithered, the one colour fill isn't always very useful. Under the Customize popup menu, the Flood Options menu have a Dithered fill option. This flood fill will fill a dithered colour. Use at own risk - it appears to work fine under Irix 4.0.4, but it may behave erratically under 4.0.5F. (dither fill works fine on all 24 bit machines on all operating systems tested).
Known bugs, common questions, and workarounds:
The zoom window sometimes overflows and leaves bits over my screen area. Why?
This problem affects Entry Indigos running Irix 4.0.4 and before. It is caused by a bug in the GL. Upgrading to 4.0.5 (or above) will solve this problem. You can also grab the zoom window and ram it against the bottom of the screen (this way the overflow won't affect your working screen).
Rotating a block leaves a black edge around the block. How do I get rid of it?
You can select Mask before you rotate the block. The default mask (black) will eliminate this colour from being drawn around the edges.
Around the edges there might be a row of pixels that look a little darker. To get rid of this row of pixels, you can paste the block down (without any masking), select buffer and do a buffer of 1 around black (assuming that there isn't any pure black in your image). You can also use Polygon and cut the block out (see Lasso).
After rectangle (or another figure) is created there are little specks inside the area of new figure. The zoom window shows everything drawn as a mixture of different colours (no solid colours).
You must be running an Entry Indigo. These machines have only 8 bitplanes (compared to 24 bits). The machine will select the closest approximation to the colour you are trying to place on the screen by dithering. A few of the pure colours will draw without any dithering.
Why don't the cross hair cursors come up in system 4.0.+ as under Irix 3.3?
The cross hair cursor will crash some versions of Irix 4.0.+ (such as Irix 4.0.4 on an Entry Indigo) so I've disabled the cross haired cursor on any version of Irix system 4.0 and over.
Centre for Landscape Research
University of Toronto
All rights reserved.
All standard disclaimers apply.
The Centre for Landscape Research, University of Toronto, makes no warranties, either express of implied, regarding this software package, or its fitness for any particular purpose.
This software is released under the condition that it is to be used for research, personal, and educational purposes; it is not to be commercially. The software is released to these users without charge with the exception of any media, duplication, and/or transport costs.
Source code acknowledgements
The following individuals and groups list have developed source code that modified and integrated into CLRpaint. Without these contributions CLRpaint would not have been nearly as complete as it currently is. Thanks!
The Independent JPEG Group's JPEG software
This software is the work of Tom Lane, Philip Gladstone, Luis Ortiz,Lee Crocker, Ge' Weijers, and other members of the Independent JPEG Group.
Contact firstname.lastname@example.org to be added to the electronic mailing list.
24bit colour tiff load and save routines:
Copyright (c) 1988, 1990 by Sam Leffler. All rights reserved.
This file is provided for unrestricted use provided that this legend is included on all tape media and as a part of the software program in whole or part. Users may copy, modify or distribute this file at will.
PhotoCD load routines:
Copyright (c) 1992 by Hadmut Danisch (email@example.com).
Loading routines from pcdtoppm v0.1.
Gif load routine from:
fromgif - convert a GIF file into an IRIS image file.
based on a GIF file reader by Marcel J.E. Mol March 23 1989
Paul Haeberli @ Silicon Graphics - 1989
Gif save routine from:
togif - Paul Haeberli @ Silicon Graphics - 1989
SGI image library & image load and save routines from:
showimg - Display a color or black and white image on the iris.
scrsave - Save a part of the screen in an image file.
Paul Haeberli - 1988
Flood fill routine
adapted from: A Seed Fill Algorithm
by Paul Heckbert, from "Graphics Gems", Academic Press, 1990
Concave Polygon Scan Conversion
by Paul Heckbert
from "Graphics Gems", Academic Press, 1990
The following smooth scale routines (box, triangle, quadratic, mitchell) are from:
izoom - by Paul Haeberli and Paul Heckbert - 1988
Magnify or minify a picture with or without filtering. The
filtered method is one pass, uses 2-d convolution, and is optimized
by integer arithmetic and precomputation of filter coeffs.
If you find any problems with CLRpaint please contact The Centre for Landscape Research through e-mail at firstname.lastname@example.org or through regular mail. CLRpaint has been tested on several SGI graphics platforms with different versions of Irix; however, I have not been able to test CLRpaint on existing hardware platforms.
If you have a bug to report please specify the hardware platform you are running, the version of Irix, the graphics options installed, and the memory on the system (the easiest way of doing this is to run an hinv and to run ginv and email the results (ginv is a utility program that should be available at the same ftp site this program was transfered from)).
Mailing address: Centre for Landscape Research, University of Toronto, 230 College Street, Toronto, Ontario, Canada M5S 1A1
To put yourself onto a CLRpaint mailing list, please send your email address to email@example.com. Users on this mailing list will be notified of new versions of CLRpaint, bug fixes and workarounds.
What the Future Holds
CLRpaint is continually being developed and tested. Some of the functions considered for the next version include:
image warping tools
more image formats
flood fill support for pattern fills, colour fills
automatic colour gradients
8bit graphics - no dither or dithering upon load for all image formats
To contact us regarding possible future enhancements please use regular mail or e-mail; we cannot handle phone calls on these issues.
|CSB Home | Search | Table of Contents | General Information|
Center for Structural Biology (www.csb.yale.edu),
Yale University (www.yale.edu)
Last Modified: Friday, 26-Mar-1999 15:08:52 EST by P. Fleming