[racket] Using big-bang with picts

From: Sean Kanaley (skanaley at gmail.com)
Date: Mon Feb 17 13:50:29 EST 2014

(define (world->image w)
  (overlay (pict->bitmap (circle w))
           (empty-scene 100 100)))


On Mon, Feb 17, 2014 at 1:40 PM, Jens Axel Søgaard <jensaxel at soegaard.net>wrote:

> Hi All,
>
> Is there a way to use big-bang with picts?
> In other words, how can I convert a pict into something that big-bang
> will display?
>
> The attempt below fails with this error:
>
>     collects/racket/private/class-internal.rkt:4387:0: send: no such method
>     method name: copy
>     class name: bitmap%
>
> #lang racket
> (require pict (only-in 2htdp/universe big-bang on-tick to-draw))
>
> (define (world->image w)
>   (pict->bitmap (circle w)))
>
> (big-bang 100
>           [on-tick add1]
>           [to-draw world->image])
>
>
> --
> Jens Axel Søgaard
>
> ____________________
>   Racket Users list:
>   http://lists.racket-lang.org/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20140217/d1bd4be4/attachment.html>

Posted on the users mailing list.