JavaLib
 
WorldLib
 
draw
idraw
adraw
colors
 
Samples
 
Sources
Downloads
 
TSRJ Home
TSRJ Local

Colors and Geometry: colors.jar, geometry.jar

The drawing packages are supported by two simple libraries for defining geometric locations and colors. The geometry package defines a single class Posn that represents a position on the canvas with Cartesian integer valued x and y coordinates.

The colors package defines the IColor interface that is implemented by six singleton classes for colors black, blue, green, red, yellow, and white. In our implementation the interface IColor defines a single method public Color thisColor() that converts the instance of IColor to Java Color. Every color class also implements the toString method to simplify the display of its value.

The Javadocs for the colors library.

The Javadocs for the geometry library.


last updated on Fri Apr 1 14:26:43 EDT 2011generated with DrRacket