I want to snap canvas but when i use Fullscreen mode = Off can get any size i want.
So what i need is to use Fullscreen mode = Letterbox scale at the beginning and when i want to snap to use Off mode until complete and rerun me to Letterbox scale mode.
Can I? Or... Is there any different way to snap any size without Off mode? I try something with browser without luck.
Develop games in your browser. Powerful, performant & highly capable.
Any help? Thanks!
Why? This sounds like an odd thing to do. "Off" mode is basically only designed for use in embedding in a fixed size iframe. Even then, letterbox scale is a better default and generally covers any usage.
Create a project with 500x500.
Set to letterbox mode.
Set size to 1000x1000 and snap. Even 250x250 if you want.
Will get result of width and height depend your browser and resolution.
So if you use the same thing but use off mode and add any size you will get the same size.
I use "canvas size" before "take snapshot".
Simple lines of code:
1) Set canvas size
2) Take snapshot
3) On canvas snapshot -> Invoke download
Is there any different way i miss to get any size with letterbox mode?
That doesn't answer why you need to do this? The snapshot feature is for taking screenshots, which means taking a copy of what the user can see, which is the canvas as displayed on the screen.
I work on a project that import an image at the center (200x200 for example) and this image i give different height and weight than what we can see on screen. So as i said, this works with off mode. I ask you in case there is any tip, even a function outside, whatever can helps. If no, it's ok, no prob.
It's still not clear why you need this or what you are trying to do.
Are you sure this is the right approach? It sounds like it might be better to paste an image to Drawing Canvas and then save that instead. That gives you more control over the image size without tieing it to the viewport size.
Ok Ashley, i will try this. Thank you for your time! :)