[racket-dev] [plt] Push #28009: master branch updated

From: Matthew Flatt (mflatt at cs.utah.edu)
Date: Sun Jan 5 10:55:12 EST 2014

Thanks --- I think I've fixed alignment for drawing to a bitmap with a
backing scale.

At Fri, 03 Jan 2014 19:33:22 -0700, Neil Toronto wrote:
> On 01/03/2014 06:12 PM, mflatt at racket-lang.org wrote:
> > bd4d0b7 Matthew Flatt <mflatt at racket-lang.org> 2014-01-03 17:57
> > :
> > | if a bitmap has a non-1 backing scale, always draw smoothly to other 
> contexts
> > :
> >    M pkgs/draw-pkgs/draw-lib/racket/draw/private/dc.rkt | 11 ++++++-----
> 
> Cool. It looks like this solved another issue as well: drawing 2x 
> bitmaps in the REPL would smooth only intermittently.
> 
> There appears to be a problem with drawing in 'unsmoothed mode onto a 
> bitmap with a backing scale. I've attached a program that demonstrates 
> using a single polygon and with plots.
> 
> In the single polygon test, the triangle drawn onto the 2x bitmap is 
> shifted down and to the right one pixel.
> 
> The code that draws a plot onto a 2x bitmap simulates the change I would 
> make to Plot to take advantage of the new backing scale feature. The 
> edge of the sphere looks lumpy, probably because polygons are drawn 
> unsmoothed and their vertices are being snapped to the wrong places. The 
> second plot shows how it's supposed to look.
> 
> The last two plots show how each looks before being scaled down. The 
> lumpiness around the edge is probably easier to see this way.
> 
> Neil ⊥
> 
> 
> ------------------------------------------------------------------------------
> [text/plain "unsmoothed-polygons.rkt"] [~/Desktop & open] [~/Temp & open]
> _________________________
>   Racket Developers list:
>   http://lists.racket-lang.org/dev


Posted on the dev mailing list.