I think this should work. We would be using the DrawingCanvas Plugin for taking the screenshot.
1.
While scaling to fit in screen, you will keep the image ratio same right?
So, to keep the ratio same, you would have to divide both height and width by the same number. For this, let's say we create a global variable called Scale
.
And we have a SizeLimit
into which the image would have to fit in.
To get the value of Scale
, divide SizeLimit by the larger one out of the width and height of the Original Image.
2.
In this scaled image, the player would be able to place text and all.
Before taking a screenshot, the image has to be resized back to its original scale, that is 1.
But the text remains in its small form and its position remains unchanged, and now doesn't match with what the player intended.
To sync the text size and position with the original size of the image, we need to multiply the current text size and position with inverse of the Scale
variable value we got earlier.
That is, multiply it's size and position with 1/Scale
3.
Then position and set size of the DrawingCanvas Plugin to that of the Sprite. And now take the screenshot.
I made a small example. This might help.
https://drive.google.com/file/d/1x3HOfMwJXuubxXrNQ2azqnvK5GyinX2I/view?usp=drive_link