Hi Alex,

My bad, I was 'reading into' something which wasn't there.

Though I wonder, why do you need a graphic "theFrame", why not just scale the image directly? I'm probably missing something here.

I do something similar, thought not the same, in my plugin, "altImgViewer", I allow users to 'double-click' an image and display it as large as it can be displayed inside a new window. I use the previously mentioned function to get the image size, then check it against the windowBoundingRect, then scale the window and the image within the window, set the filename to the image and everything works fine.

Seems redundant to use a 'frame' unless you're using it for visual purposes.

best,

Chipp

Alex Tweedly wrote:
Jon wrote:

This is great if you know in advance that there is enough room to display the image in this way, at this particular scale. What I wanted was something that automatically displayed the image at the largest resolution possible in "the available space". That's where the confusion comes in: I need to store the "available space" somewhere in the Image object if I am to perform the computations properly. Maybe it is just that simple, at least for me.


I did that by putting in a graphic "theFrame" which was set to the maximum size available for the image. In the Geometry manager, I set the graphic up to stretch to fill the space when the user resized the stack window (and ignored the image object). And then simply calculated the sizes for the image to fit inside the graphic "theFrame".


_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to