slideshow: consistent rounding for clickbacks

This commit is contained in:
Matthew Flatt 2010-10-29 15:11:48 -06:00
parent f74c0de6ad
commit aa958f8986

View File

@ -676,6 +676,10 @@
[y (click-region-top clicking)]
[w (- (click-region-right clicking) (click-region-left clicking))]
[h (- (click-region-bottom clicking) (click-region-top clicking))])
(let ([x (floor x)]
[y (floor y)]
[w (- (floor (+ x w)) (floor x))]
[h (- (floor (+ y h)) (floor y))])
(if (or on?
(not config:use-offscreen?)
(not offscreen))
@ -689,10 +693,6 @@
(send dc draw-rectangle x y w h)
(send dc set-pen p)
(send dc set-brush b))
(let ([x (floor x)]
[y (floor y)]
[w (- (floor (+ x w)) (floor x))]
[h (- (floor (+ y h)) (floor y))])
(send dc draw-bitmap-section
(send offscreen get-bitmap)
x y x y