Resizing a canvas
BlitzPlus Forums/BlitzPlus Programming/Resizing a canvas
| ||
I use setGadgetLayout to resize a canvas with a new width and height, but instead of actually changing the resolution of the canvas, it just scales and blurs it. This can be seen when using graphics 640,480,0,(3) and resizing the window. Any way around this? |
| ||
On resize you'll need to create another canvas and copy the content of the first one to the second. Then free the first one. |
| ||
Or create a panel, put a large canvas (the biggest one you intend to use for your app) on the panel, and resize the panel ... ^^; |
| ||
hmm, I thought that might be the case. Weird though. Is it slow? |
| ||
CS_TBL's solution is a good one which I also use. First, get the width & height of the users desktop and make a canvas the same size. Then when required, just show a portion of it to whatever dimensions you require. This stops the blurring effect and you dont need to create another canvas. It works for me. |
| ||
ok, thanks. |