I am using the Graphics library and I have 2 questions:
(I am running HUGS 1.4 (970719) on Windows 95)

- If I call "polyline" with a single point it does strange things (the
 following program shows a window and closes it inmediatly). Is it normal?

- Suppose I want to draw a program who prints infinite lines 
(until I type interrupt it). For example:

doLines = [line p1 p2 |(p1,p2) <- zip pts (tail pts) ]
 where pts = map f [0..]
       f x = (x+1,x+1)

How can I print then on the screen. I tried with "overMany" but it tries to
evaluate the list and it doesn't print anything.

Greetings, Jose E. Labra G.
http://www.uniovi.es/~oviedo3/Enlaces/Personal/Labra

-----------------------------------------------------
Here is the program I used:

module TestGraphics where
import Graphics
import GraphicsColor
import Array

test = runGraphics�
              (do
���������       w�<-�openWindow�"Test"�(300,�300)
                draw w (mkPen Solid 1 (colorTable!Blue) $ \pen ->
                        withPen pen $
                        -- polyline [(300,300)] -- This doesn't work
                        overMany doLines 
                       )
���������       getKey�w
���������       closeWindow�w
���������      )

doLines::[Picture]
doLines = [line p1 p2 |(p1,p2) <- zip pts (tail pts) ]
 where pts = map f [0..]
       f x = (x+1,x+1)

Reply via email to