racket/teachpack/htdc/Docs/idraw.thtml
Matthias Felleisen 2b4921291d addec docs for HtDC teachpacks
svn: r2215
2006-02-13 19:04:11 +00:00

53 lines
2.2 KiB
Plaintext

{ (define LIBNAME "An Imperative Drawing Library (HtDC)")
(include "head.tinc") }
This `idraw' package provides classes and imperative methods for modeling
in a visual world. Here is its class diagram of public fields and methods:
<pre>
<code>
+---------------------------------+
| abstract World |
+---------------------------------+ +------------------------------------+
| Canvas theCanvas |------>| Canvas |
+---------------------------------+ +------------------------------------+
| void bigBang(int,int,double) | +------------------------------------+
| void endOfTime() | | void start(int,int) |
| | | void stop() |
| abstract void onTick() | | void drawCircle(Posn,int,Color) |
| abstract void onKeyEvent(String)| | void drawDisk(Posn,int,Color) |
| abstract void draw() | | void drawRect(Posn,int,int,Color) |
| abstract void erase() | | void drawLine(Posn,Posn,Color) |
+---------------------------------+ | void drawString(Posn,String) |
| void clearCircle(Posn,int,Color) |
| void clearDisk(Posn,int,Color) |
| void clearRect(Posn,int,int,Color) |
| void clearLine(Posn,Posn,Color) |
+------------------------------------+
+----------+
| Posn |
+----------+
| int x |
| int y |
+----------+
+-------+
| Color |
+-------+
|
/ \
---
|
------------------------------------------
| | | | |
+-------+ +-------+ +-------+ +-------+ +-------+
| Blue | | Green | | Red | | White | | Yellow|
+-------+ +-------+ +-------+ +-------+ +-------+
</code>
</pre>
{(include "foot.tinc")}