From 9eeb5c84839ef12f3769ff9fb55eb8cba56aff2f Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Wed, 16 Jun 2010 11:35:40 -0500 Subject: [PATCH] a bunch of little fixes to the 2htdp/image library (and related) for sfp submission: - added in the htdp/image version of the performance test case - made gui-eval work with things other than slideshow - extended render-image so that it works on bitmaps and image-snips original commit: 22bc8f6d87f12efa6b720249a194db5dd555056e --- collects/mrlib/image-core.rkt | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/collects/mrlib/image-core.rkt b/collects/mrlib/image-core.rkt index 860d8914..3d9a13f2 100644 --- a/collects/mrlib/image-core.rkt +++ b/collects/mrlib/image-core.rkt @@ -552,7 +552,13 @@ has been moved out). [font (send dc get-font)] [fg (send dc get-text-foreground)] [smoothing (send dc get-smoothing)]) - (render-normalized-shape (send image get-normalized-shape) dc dx dy) + (cond + [(is-a? image bitmap%) + (send dc draw-bitmap image dx dy)] + [(is-a? image image-snip%) + (send dc draw-bitmap (send image get-bitmap) dx dy)] + [else + (render-normalized-shape (send image get-normalized-shape) dc dx dy)]) (send dc set-pen pen) (send dc set-brush brush) (send dc set-font font)