Fixed graphical glitches:
plots too small to render margin decorations (i.e. axis and tick labels) now render without them; plots in frames now initially render with full detail
This commit is contained in:
parent
610280225c
commit
568828d491
|
@ -306,6 +306,15 @@
|
|||
(define new-top (round (+ top (- y-min param-y-min))))
|
||||
(define new-bottom (round (- bottom (- (sub1 y-max) param-y-max))))
|
||||
|
||||
;; Not enough space?
|
||||
(define area-x-min (+ x-min new-left))
|
||||
(define area-x-max (- x-max new-right))
|
||||
(define area-y-min (+ y-min new-top))
|
||||
(define area-y-max (- y-max new-bottom))
|
||||
(when (or (area-x-min . > . area-x-max)
|
||||
(area-y-min . > . area-y-max))
|
||||
(return init-left init-right init-top init-bottom))
|
||||
|
||||
;; Early out: if the margins haven't changed much, another iteration won't change them more
|
||||
;; (hopefully)
|
||||
(when (and (= left new-left) (= right new-right)
|
||||
|
|
|
@ -18,12 +18,10 @@
|
|||
))
|
||||
|
||||
(define (make-snip-frame snip width height label)
|
||||
(define (make-snip w h)
|
||||
(send snip resize w h)
|
||||
snip)
|
||||
(define (make-snip w h) snip)
|
||||
|
||||
(define frame
|
||||
(new snip-frame% [label label] [width (+ 10 width)] [height (+ 10 height)]))
|
||||
(new snip-frame% [label label] [width (+ 20 width)] [height (+ 20 height)]))
|
||||
|
||||
(new snip-canvas%
|
||||
[parent frame]
|
||||
|
|
Loading…
Reference in New Issue
Block a user