From 9e36dc8eb328d9c50fcdaf2a8765b09e6591e96e Mon Sep 17 00:00:00 2001 From: Robby Findler Date: Thu, 2 Jun 2011 16:25:23 -0700 Subject: [PATCH] adding a missing 2htdp/image color => racket/gui color coercion closes PR 11956 --- collects/2htdp/tests/test-image.rkt | 8 ++++++++ collects/mrlib/image-core.rkt | 2 +- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/collects/2htdp/tests/test-image.rkt b/collects/2htdp/tests/test-image.rkt index eb8f0fe523..b4d4a61dba 100644 --- a/collects/2htdp/tests/test-image.rkt +++ b/collects/2htdp/tests/test-image.rkt @@ -1665,6 +1665,14 @@ 160 160 0 1/2 (make-pen "black" 12 "solid" "round" "round"))) +(test (add-line (rectangle 30 30 "outline" "black") + 0 0 30 30 + (make-pen (make-color 0 0 0 255) 15 "solid" "butt" "round")) + => + (add-line (rectangle 30 30 "outline" "black") + 0 0 30 30 + (make-pen "black" 15 "solid" "butt" "round"))) + (test (image->color-list (above (beside (rectangle 1 1 'solid (color 1 1 1)) (rectangle 1 1 'solid (color 2 2 2)) diff --git a/collects/mrlib/image-core.rkt b/collects/mrlib/image-core.rkt index 46903568a1..f4c23f299c 100644 --- a/collects/mrlib/image-core.rkt +++ b/collects/mrlib/image-core.rkt @@ -1136,7 +1136,7 @@ the mask bitmap and the original bitmap are all together in a single bytes! (define (pen->pen-obj/cache pen) (send the-pen-list find-or-create-pen - (pen-color pen) + (get-color-arg (pen-color pen)) (pen-width pen) (pen-style pen) (pen-cap pen)