The problem is that the coordinates are "between" the pixels. There is an explanation of this in the context of another library, but the issues are the same:
http://docs.racket-lang.org/teachpack/2htdpimage.html?q=2htdp/image#%28part._nitty-gritty%29 hth, Robby On Thu, May 10, 2012 at 8:29 AM, Garrett Mitchener < garrett.mitche...@gmail.com> wrote: > Hi, I'm learning the racket GUI package, and I ran into something that > doesn't make sense to me: > > #lang racket/gui > > (define black-pen > (new pen% > [width 1] > [color "black"])) > > (define blue-brush > (new brush% > [color "blue"])) > > (define (draw-test-2 dc) > (send dc scale 10 10) > (send dc set-pen black-pen) > (send dc set-brush blue-brush) > (send dc draw-rectangle 7 2 4 4)) > > (define pic (make-bitmap 200 100)) > > (define dc (new bitmap-dc% [bitmap pic])) > > (draw-test-2 dc) > > And at the end, pic looks like this: > > [image: Inline image 1] > The outline and the filling don't line up. What am I doing wrong? This > is with DrRacket 5.2.1 on linux. > > Thanks, > -- Garrett Mitchener > > ____________________ > Racket Users list: > http://lists.racket-lang.org/users > >
____________________ Racket Users list: http://lists.racket-lang.org/users