From dd9e8c530bb24f4d594c54060f61eb83fb3e401c Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Mon, 3 Jan 2011 20:53:47 -0600 Subject: [PATCH] fix the use of draw-caret in 2htdp/image --- collects/mrlib/image-core.rkt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/collects/mrlib/image-core.rkt b/collects/mrlib/image-core.rkt index feb771ea6c..e10ca5c099 100644 --- a/collects/mrlib/image-core.rkt +++ b/collects/mrlib/image-core.rkt @@ -316,7 +316,7 @@ has been moved out). (define cached-bitmap #f) - (define/override (draw dc x y left top right bottom dx dy draw-caret?) + (define/override (draw dc x y left top right bottom dx dy draw-caret) (unless cached-bitmap (set! cached-bitmap (make-bitmap (+ (inexact->exact (round (bb-right bb))) 1) (+ (inexact->exact (round (bb-bottom bb))) 1))) @@ -326,7 +326,7 @@ has been moved out). (send bdc set-bitmap #f)) (let ([alpha (send dc get-alpha)]) - (when draw-caret? + (when (pair? draw-caret) (send dc set-alpha (* alpha .5))) (send dc draw-bitmap cached-bitmap x y) (send dc set-alpha alpha)))