[racket] Using big-bang with picts

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Tue Feb 18 14:24:41 EST 2014

Hi All,

Thanks for the various suggestions.
I got the animation working with picts.

/Jens Axel



2014-02-17 19:50 GMT+01:00 Sean Kanaley <skanaley at gmail.com>:
> (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
>
>



-- 
--
Jens Axel Søgaard


Posted on the users mailing list.