diff --git a/collects/2htdp/private/image-more.rkt b/collects/2htdp/private/image-more.rkt index 8f69ca0f9a..74c65d9c6c 100644 --- a/collects/2htdp/private/image-more.rkt +++ b/collects/2htdp/private/image-more.rkt @@ -432,12 +432,15 @@ ;; (useful for debugging images) (define/chk (frame image) - (make-image (make-overlay (image-shape image) - (image-shape - (rectangle (get-right image) - (get-bottom image) - 'outline - 'black))) + (make-image (make-overlay (image-shape + (crop 0 0 + (get-right image) + (get-bottom image) + (rectangle (get-right image) + (get-bottom image) + 'outline + (pen "black" 2 'solid 'round 'round)))) + (image-shape image)) (make-bb (get-right image) (get-bottom image) (get-baseline image)) diff --git a/collects/teachpack/2htdp/scribblings/image-toc.rkt b/collects/teachpack/2htdp/scribblings/image-toc.rkt index 48297d42d6..0c4abae7fb 100644 --- a/collects/teachpack/2htdp/scribblings/image-toc.rkt +++ b/collects/teachpack/2htdp/scribblings/image-toc.rkt @@ -135,7 +135,7 @@ (ellipse 20 10 "solid" "navy")) 'image "54a488e1a5.png") - (list '(frame (ellipse 20 20 "outline" "black")) 'image "6a5a617f28.png") + (list '(frame (ellipse 40 40 "solid" "gray")) 'image "1a74ac09f8a.png") (list '(above (beside diff --git a/collects/teachpack/2htdp/scribblings/image.scrbl b/collects/teachpack/2htdp/scribblings/image.scrbl index 921de46a91..bf292c5056 100644 --- a/collects/teachpack/2htdp/scribblings/image.scrbl +++ b/collects/teachpack/2htdp/scribblings/image.scrbl @@ -1035,7 +1035,7 @@ the parts that fit onto @racket[scene]. with a black, single pixel frame drawn around the bounding box of the image. - @image-examples[(frame (ellipse 20 20 "outline" "black"))] + @image-examples[(frame (ellipse 40 40 "solid" "gray"))] Generally speaking, this function is useful to debug image constructions, i.e., to see where @@ -1434,6 +1434,12 @@ interior. [r (beside s s s s s s)]) (above r r r r r r))] +While this kind of rectangle is not useful for building grids, it +is important to be able to build rectangles whose drawing does not +exceed its bounding box. Specifically, this kind of drawing is used +by @racket[frame] and @racket[empty-scene] so that the extra drawn pixels +are not lost if the image is later clipped to its bounding box. + @;----------------------------------------------------------------------------- @section{Exporting Images to Disk} diff --git a/collects/teachpack/2htdp/scribblings/img/19e57826953.png b/collects/teachpack/2htdp/scribblings/img/19e57826953.png deleted file mode 100644 index 0705890a9f..0000000000 Binary files a/collects/teachpack/2htdp/scribblings/img/19e57826953.png and /dev/null differ diff --git a/collects/teachpack/2htdp/scribblings/img/1a74ac09f8a.png b/collects/teachpack/2htdp/scribblings/img/1a74ac09f8a.png new file mode 100644 index 0000000000..6c1946d898 Binary files /dev/null and b/collects/teachpack/2htdp/scribblings/img/1a74ac09f8a.png differ diff --git a/collects/teachpack/2htdp/scribblings/img/26e407a14a2.png b/collects/teachpack/2htdp/scribblings/img/26e407a14a2.png deleted file mode 100644 index ff9cb5b754..0000000000 Binary files a/collects/teachpack/2htdp/scribblings/img/26e407a14a2.png and /dev/null differ diff --git a/collects/teachpack/2htdp/scribblings/img/54a488e1a5.png b/collects/teachpack/2htdp/scribblings/img/54a488e1a5.png index c9e9b1a692..a8c4638304 100644 Binary files a/collects/teachpack/2htdp/scribblings/img/54a488e1a5.png and b/collects/teachpack/2htdp/scribblings/img/54a488e1a5.png differ diff --git a/collects/teachpack/2htdp/scribblings/img/6a5a617f28.png b/collects/teachpack/2htdp/scribblings/img/6a5a617f28.png deleted file mode 100644 index 4bb9e69275..0000000000 Binary files a/collects/teachpack/2htdp/scribblings/img/6a5a617f28.png and /dev/null differ