[racket] Bug in place-image?

From: Robby Findler (robby at eecs.northwestern.edu)
Date: Thu Dec 27 20:39:27 EST 2012

On Thu, Dec 20, 2012 at 4:23 PM, Matthias Felleisen <matthias at ccs.neu.edu>wrote:

>
> On Dec 19, 2012, at 3:47 PM, Miguel Villaverde wrote:
>
> > While working on HTDP2, I noticed the following: place-image seems to
> snip
> > the last column and row of pixels in its background image. This does not
> > happen when using overlay instead, or if the background is a scene.
> > place-image/align shows the same behavior:
> >
> > (require 2htdp/image)
> >
> > (define CIRCLE (circle 5 "solid" "red"))
> > (define RECTANGLE (rectangle 100 100 "outline" "black"))
> > (define SCENE (empty-scene 100 100))
> >
> > (place-image CIRCLE 50 50 RECTANGLE)
> > (overlay CIRCLE RECTANGLE)
> > (place-image CIRCLE 50 50 SCENE)
> > (overlay CIRCLE SCENE)
> >
> > (place-image/align CIRCLE 50 50 "center" "center" RECTANGLE)
> >
> > If you run that, you'll notice the rectangle has lost its right and
> bottom
> > borders in the first and last images. This is using the beginner student
> > language in DrRacket 5.3.1.
> >
> > Is this a bug? Is it intended behavior? If so, why?
>
>
> This is not a bug but an unfortunate feature.
> The documentation for 2htdp/image has a section
> on the details of drawing things with pen (bottom).
>
>
This section is actually the first one in the image guide:

  http://docs.racket-lang.org/teachpack/2htdpimage-guide.html

Robby
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20121227/0707c01d/attachment.html>

Posted on the users mailing list.