Chipmunk and X: Color Depth

Chipmunk tools currently support monochrome, 8-bit, 16-bit, and 24-bit displays. The 16-bit and 24-bit display modes are only known to work on the PC architecture (X11 under Linux and OS/2); see this document for more details on the current status of color support.

By default, the Chipmunk tools select a color mode using these rules:

The user can force the color mode of a Chipmunk tool by setting the environment variable LOG_COLOR to be the string bw or 8bit or 16bit or 24bit.

Chipmunk and X: Window Placement and Fonts

Manually placing and sizing the mylib and newcrt windows can quickly become tedious. The Chipmunk tools can automatically size and place these windows. To enable this feature, you'll need to add information to an X initialization file in your home directory, typically named .Xresources. Three resources are implemented for the Chipmunk tools:

mylib.geometry: =AxB+C+D
You can use this resource to set the size of the mylib window to have an X dimension of A pixels, and a Y dimension of B pixels, and have it automatically placed at the position indicated by C (x placement) and D (y placement).
newcrt.geometry: +C+D
The size of the newcrt window is fixed for all Chipmunk tools. This resource automatically places the newcrt window at a position indicated by C (x placement) and D (y placement).
mylib.color black_and_white
This X resource forces Chipmunk tools to generate monochrome displays, even if the machine has a color monitor.

By default, the mylib window uses the 6x10 font and the newcrt window uses the 8x13 font. On some X servers, these fonts may not be available. These resources change the default fonts:

mylib.font: fontname
newcrt.font: fontname

Alternatively, the default fonts may be specified at compile-time in the psys Makefile.

After changing the .Xresources file, run xrdb -merge .Xresources to activate the new behaviors. If this command does not update your X server, you should exit and restart the X server.


My .Xresources for my color Sun IPC machine is as follows:

mylib.geometry: =1150x550+0+0

newcrt.geometry: +510+586

My .Xresources for my HP 712/80 machine, which has a higher-resolution monitor, is

mylib.geometry: =1278x682+0+0

newcrt.geometry: +638+710

Some versions of the NX server do not have the default Chipmunk fonts available. The .Xresources entries below remedy the situation:

mylib.font: 6x13

newcrt.font: 6x13

These features were added to the Chipmunk tools by Jim Clark at Harvard University, Tor Sverre Lande at IFI, and Michael Godfrey at Stanford University. Thanks to Derek Woolverton for documentation updates.

john [dot] lazzaro [at] gmail [dot] com