Draw plots to bitmaps using #:backing-scale for Retina displays
This commit is contained in:
parent
9de2aff3f3
commit
79c51ef001
|
@ -562,16 +562,10 @@
|
||||||
;; Drawing a bitmap using 2x supersampling
|
;; Drawing a bitmap using 2x supersampling
|
||||||
|
|
||||||
(define (draw-bitmap/supersampling draw width height)
|
(define (draw-bitmap/supersampling draw width height)
|
||||||
(define bm2 (make-bitmap (* 2 width) (* 2 height)))
|
(define bm (make-bitmap width height #:backing-scale 2))
|
||||||
(define dc2 (make-object bitmap-dc% bm2))
|
|
||||||
(send dc2 set-scale 2 2)
|
|
||||||
(draw dc2)
|
|
||||||
|
|
||||||
(define bm (make-bitmap width height))
|
|
||||||
(define dc (make-object bitmap-dc% bm))
|
(define dc (make-object bitmap-dc% bm))
|
||||||
(send dc set-scale 1/2 1/2)
|
(send dc set-alignment-scale 2)
|
||||||
(send dc set-smoothing 'smoothed)
|
(draw dc)
|
||||||
(send dc draw-bitmap bm2 0 0)
|
|
||||||
bm)
|
bm)
|
||||||
|
|
||||||
(define (draw-bitmap draw width height)
|
(define (draw-bitmap draw width height)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user