[racket] Racket/gui : How to rotate a bitmap% ?

From: Noel Welsh (noelwelsh at gmail.com)
Date: Tue May 10 11:28:27 EDT 2011

Ok, I don't understand what you want then. I tried the code below and
it did what I expect.


racket@> (define (display-bitmap bitmap)
  (define f
    (new frame%
         [label "Bitmap"]
         [width (send bitmap get-width)]
         [height (send bitmap get-height)]))
  (define c (new canvas%
                 [parent f]
                  (lambda (canvas dc)
                    (send dc translate 10 10)
                    (send dc rotate .1)
                    (send dc draw-bitmap bitmap 0 0))]))

  (send f show #t)
racket@> (define texture
  (make-object bitmap%
racket@> (display-bitmap texture)

2011/5/10 Jyu 。 <julien-0659 at hotmail.fr>:
> @noelWelsh : I tested your advice, but it not run.. I tested to rotate and
> translate then : The bitmap is turn around another point..
> I test to translate and rotate then, the result is the same. Thanks you
> anyway.

Posted on the users mailing list.