Next: A More Complicated Example Up: Viewport Graphics Previous: Miscellaneous Operations

# An Example

         ; nothing appears to happen, but the library is initialized...
      > (open-graphics)

         ; viewport appears
      > (define w (open-viewport "practice" 300 300))

         ; line appears
      > ((draw-line w) (make-posn 30 30) (make-posn 100 100))

         ; viewport disappears
      > (close-viewport w)

         ; again, nothing appears to happen
         ; unclosed viewports (if any) would disappear
      > (close-graphics)