[racket] again a image problem

From: Roelof Wobben (r.wobben at home.nl)
Date: Thu May 3 04:02:41 EDT 2012

Op 2-5-2012 22:05, Roelof Wobben schreef:
> Hello,
>
> 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.
>
> Roelof
>
> ____________________
>  Racket Users list:
>  http://lists.racket-lang.org/users
>

I solved that one myself by using this :

(place-image (overlay/xy gauge-omtrek 0 0 (rectangle 10 20 "solid" 
"red")) 500 10 (place-image cat 40 140 workspace))

Roelof


Posted on the users mailing list.