racket/draw: fix return value of load-file' from bitmap%'

This commit is contained in:
Matthew Flatt 2012-10-01 18:13:50 -06:00
parent efcad101d1
commit 64bac4e573
2 changed files with 7 additions and 1 deletions

View File

@ -302,7 +302,8 @@
(set!-values (s b&w?) (do-load-bitmap in kind bg complain-on-failure?))
(set! width (if s (cairo_image_surface_get_width s) 0))
(set! height (if s (cairo_image_surface_get_height s) 0))
(set! shadow (make-bytes (* width height 4))))
(set! shadow (make-bytes (* width height 4)))
(and s #t))
(define/private (do-load-bitmap in kind bg complain-on-failure?)
(if (path-string? in)

View File

@ -620,4 +620,9 @@
;; ----------------------------------------
(let ([bm (make-object bitmap% 1 1)])
(test #t 'load-file (send bm load-file (collection-file-path "sk.jpg" "icons"))))
;; ----------------------------------------
(report-errs)