I will be drawing some stuff to a canvas and what I will be drawing will be too large for the actual screen space that the canvas with occupy. It is not reasonable to scale the drawing to fit due to the nature of the content. I want to know how these three things interelate (the documentation does not seem to say):
The canvas has some “size” (returned by its size() method. Is this size “fixed” for the life of the canvas or can it be grown/shrunk somehow.
The draw() method in the Program trait gets passed a bounds argument, a Rectangle struct. What does this represent? The canvas’s size or something else?
When creating a Frame, a size of passed to Frame’s new function. What are the limitations of this argument? Can I just specify something totally arbitarily large?
What happens if something is drawn “out of bounds” (outside of the Frame’s boundries)?
(Also how does a scrollable deal with a canvas? Or does it?)
In the original Tk implementation, using Tk’s canvas, it was possible to draw anywhere, including outside of the visible portion of the canvas. It was then possible to get an overall bounding box of everything that was drawn and that in turn can be used to set the canvas’s “scroll region”, which in turn would control scrollbars, allowing scrolling (both directions). I’m wondering, is it possible to do something similar with iced?