[racket] Problem with hline in

From: Jens Axel Søgaard (jensaxel at soegaard.net)
Date: Sat May 26 10:48:22 EDT 2012

2012/5/26 Robby Findler <robby at eecs.northwestern.edu>:
> I think this is the result of cropping to the boundary box and the end
> of the line is cropped on the left, but not the right (in the
> attachment; in the program, it gets cropped along the bottom too).

That's odd. The documentation on hline says the line is centered
in its bounding box.

> This looks right:
> #lang racket
> (require slideshow)
> (slide (scale (hline 30 1) 15))
> So if you're using this in some larger context, you need to take into
> account the actual space of the line itself when cropping.

I guess I didn't knew I was cropping :-)

So when I type
    (scale (hline 30 1) 15)
into the interaction window, the cropping is done by pict->bitmap?

How can I avoid the cropping?

I tried a bunch of the bounding box adjusting functions, but no cigar.

I even tried appending a blank to the left:
    (hc-append (blank 1 1) (scale (hline 30 1) 30))
but that didn't work either.

/Jens Axel

Posted on the users mailing list.