racket/collects/images/tests/other-tests.rkt
Stephen Chang 72e86cb00b fix Bitmap%:get-argb-pixels type in images/flomap
- added missing case

closes PR 13717
2013-04-27 18:36:35 -04:00

20 lines
449 B
Racket

#lang racket/gui
(require images/flomap)
(require rackunit)
;; checks pr 13717
(define bmp
(flomap->bitmap
(build-flomap 1 10 10
(lambda (k x y) (/ (+ x y) 200)))))
(define bmp-buf1 (make-bytes (* 10 10 4)))
(define bmp-buf2 (make-bytes (* 10 10 4)))
(send bmp get-argb-pixels 0 0 10 10 bmp-buf1)
(send bmp set-argb-pixels 0 0 10 10 bmp-buf1)
(send bmp get-argb-pixels 0 0 10 10 bmp-buf2)
(check-equal? bmp-buf1 bmp-buf2)