7.2 Using color in the Window Tool Kit

7.2.1 The shortest route to displaying color

If you would like to see color right away, initialize windows on your display and enter the following expressions:

> (setup-color-library)   ; With no arguments, this function
NIL                       ; registers the primary colors.

> (setq window (make-window :width 100 :height 100 :depth (display-depth))) #<Window 100x100x8 at (0,0) F665FB>

> (draw-rectangle window 10 10 :width 30 :height 20 :foreground "MAGENTA") NIL

For a more interesting demonstration of color, use the code provided in Section 7.4 on page 77.

The Window Tool Kit - 9 SEP 1996

Generated with Harlequin WebMaker