{ (define LIBNAME "A Functional Drawing Library (HtDC)") (include "head.tinc") } This `draw' package provides classes and methods for modeling in a visual world. Here is its class diagram of public fields and methods:

 +-----------------------------------+
 | abstract World                    |
 +-----------------------------------+       +---------------------------------------+
 | Canvas theCanvas                  |------>| Canvas                                |
 +-----------------------------------+       +---------------------------------------+
 | boolean bigBang(int,int,double)   |       +---------------------------------------+
 | boolean endOfTime()               |       | boolean start(int,int)                |
 | boolean endOfWorld()              |       | boolean stop()                        |
 | World lastWorld()                 |       | boolean drawCircle(Posn,int,Color)    |
 |                                   |       | boolean drawDisk(Posn,int,Color)      |
 | abstract World onTick()           |       | boolean drawRect(Posn,int,int,Color)  |
 | abstract World onKeyEvent(String) |       | boolean drawLine(Posn,Posn,Color)     |
 | abstract boolean draw()           |       | boolean drawString(Posn,String)       |
 | abstract boolean erase(           |       | boolean clearCircle(Posn,int,Color)   |
 +-----------------------------------+       | boolean clearDisk(Posn,int,Color)     |
                                             | boolean clearRect(Posn,int,int,Color) |
                                             | boolean clearLine(Posn,Posn,Color)    |
                                             +---------------------------------------+

                      +----------+
                      | Posn     |
                      +----------+
                      | int x    |
                      | int y    |
                      +----------+

                              +-------+
                              | Color |
                              +-------+
                                  |
                                 / \
                                 ---
                                  |
             ------------------------------------------
             |          |         |         |         |     
         +-------+  +-------+ +-------+ +-------+ +-------+  
         | Blue  |  | Green | | Red   | | White | | Yellow| 
         +-------+  +-------+ +-------+ +-------+ +-------+ 

{(include "foot.tinc")}