On May 4, 2015, at 6:02 PM, Robby Findler <[email protected]> wrote:
> It certainly can lose sharpness if you scale (as the freezing process > is basically just rendering them into bitmaps and then drawing the > bitmaps and scaling the bitmaps looses quality because the scaling for > process of bitmaps doesn't have the geometric information to work > with). Sorry, that’s not what I mean’t by sharpness. I mean that the tips of the fractal look rounded to me; probably something to do with the bounding boxes of rotated images, and how they interact when put beside one another? Anyway it looked to me like something that could mess up how the layers lined up, so that’s why I used the approach I did. > It seems like, with fractals, the fact that you have self-similarity > means that you can have repeated images in a dag-like structure (like > the example on the webpage) where freezing might help. But since they’re all rotated from one another, would it still help? The documentation says it doesn’t help when it will be rotated, and I can imagine why. > Another approach here would be to help me do performance debugging of > 2htdp/image :). You could write the code directly as imperative calls > to the dc<%> interface and see how that compares. If there's a > significant difference, that suggests we might be able to find a way > to speed up 2htdp/image. I think once I finish this English paper that’s what I’ll do. > You'd use something like this: > > #lang racket/gui > > (define (draw-it dc w h) > ;; fractal drawing code goes here > (send dc draw-ellipse (/ w 4) (/ h 4) (/ w 2) (/ h 2))) > > (define f (new frame% [label ""] [width 200] [height 200])) > (define c (new canvas% [parent f] > [paint-callback > (λ (c dc) > (define-values (w h) (send c get-client-size)) > (send dc set-smoothing 'aligned) > (draw-it dc w h))])) > (send f show #t) -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.

