Canvas Resizing

BlitzPlus Forums/BlitzPlus Beginners Area/Canvas Resizing

Alaric(Posted 2006) [#1]
Right now I'm working on a simple paint program. I want the user to be able to resize the window just like in MS-Paint so that the canvas just kinda sits in the top left corner of the app. However, even when I try using any variation of setgadgetlayout B+ just resizes the canvas AND the graphics that are already drawn on it. To put it simply, B+ streches the graphics as if it were using scalimage or something as opposed to simply showing more pixels of it. How do I get around this?


CS_TBL(Posted 2006) [#2]
well, one thing you could do is put a full-size canvas on a panel, and resize the panel.. :P


Andres(Posted 2006) [#3]
When resizing the canvas you can remove the old one and create a new one so the resolution of the canvas will change.


Alaric(Posted 2006) [#4]
great idea CS_TBL! I think it will do what I want it to. Thanks!


CS_TBL(Posted 2006) [#5]
Andres: would that look/work properly when resizing all that stuff in a modal loop? While resize-dragging you're deleting the canvas you're resizing.. I dunno, I think there's a reason why I never even *tried* this. :P