[plt-scheme] Dislay a background image on frame.
Here a real simple example of loading and drawing a bitmap.
#lang scheme/gui
(define the-bitmap
(make-object bitmap% "225px-Charles_Darwin_seated.jpg"))
(define frame
(instantiate frame%
("Display a bitmap")))
(define canvas
(instantiate canvas%
(frame)
(paint-callback
(lambda (canvas dc)
(send dc draw-bitmap the-bitmap 0 0)))
(min-width (send the-bitmap get-width))
(min-height (send the-bitmap get-height))))
(send frame show #t)
Doug
On Fri, Sep 4, 2009 at 9:36 AM, Zach Brown <growingupright at yahoo.com> wrote:
> Hello,
>
> I need to find out how to display an image ( im1.gif ) on a PLT
> Scheme frame. I think I need to make a bitmap object, but I am not sure. Any
> help would be wonderful.
>
> Thanks,
>
> Zach Brown
> http://www.zbtech.tk
>
>
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20090904/ecde85eb/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test-load-bitmap.ss
Type: application/octet-stream
Size: 434 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20090904/ecde85eb/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 225px-Charles_Darwin_seated.jpg
Type: image/jpeg
Size: 19570 bytes
Desc: not available
URL: <http://lists.racket-lang.org/users/archive/attachments/20090904/ecde85eb/attachment.jpg>