[racket] again a image problem

From: Roelof Wobben (r.wobben at home.nl)
Date: Wed May 2 16:05:40 EDT 2012


I try to make a function in which a gauge get descreased and the 
x-postion of a cat get decreased.
But that's not the problem.

Im trying to make the display function now.

When I break down the display in parts I get this :

(define cat  )
(define workspace (empty-scene 1000 200))
(define gauge-omtrek (rectangle 1000 20 "outline" "black"))
(define gauge (overlay/xy gauge-omtrek 0 0 workspace))
(define gauge2 (overlay/xy (rectangle 100 20 "solid" "red") 0 0 gauge))
(define picture (overlay/xy cat -920 -80 gauge2))

That's work well but not in a display world function.

So I tried to make it nested but I do not succeed in it.
So far I have this :

(overlay/xy (rectangle 1000 20 "solid" "red")
             0 0 (overlay/xy (rectangle  1000 20 "outline" "black")
                         (overlay/xy cat -920 -80 (empty-scene 1000 200))
                0 0 (empty-scene 1000 200))

When I delete the (overlay/xy cat .... rule it works fine.

Who can give me tips how I can take care that the cat is on the right spot.
I know this is not a well designed function but I try to figure out how 
I can make this work.


Posted on the users mailing list.