[racket] reason for limit of 1M on virtual canvas size?
Currently, calling ‘init-auto-scrollbars’ with a virtual canvas size larger than a million signals a contract error:
../draw.rkt:231:6: init-auto-scrollbars in canvas%: contract violation
expected: (integer-in 1 1000000)
given: 1638400
This arises when scrolling through zoomed-in sounds using ‘rsound’. The limit of 1M along with the standard sample rate of 44.1KHz means that you can’t zoom in to 1 sample per pixel on sounds longer than 22 seconds.
It seems reasonable to me that there should be some limit, and that I’ll have to check for it either way, but in this case, it seems like the 1M limit could perhaps be raised without ill effect. Maybe 100M?
Looking at the docs, I see that there’s the notion of a ‘dimension-integer’ that’s fairly pervasive. In this case, I can see that changing this might impact the scroll-thumb-size computation, and possibly the “page left/page right” computation.
John Clements